1142#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
1143#define _CRT_SECURE_NO_WARNINGS
1146#ifndef IMGUI_DEFINE_MATH_OPERATORS
1147#define IMGUI_DEFINE_MATH_OPERATORS
1151#ifndef IMGUI_DISABLE
1159#if defined(_WIN32) && !defined(_MSC_VER) && !defined(IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS)
1160#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
1164#if defined(_WIN32) && defined(IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS) && defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) && defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS) && defined(IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
1165#define IMGUI_DISABLE_WIN32_FUNCTIONS
1167#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
1168#ifndef WIN32_LEAN_AND_MEAN
1169#define WIN32_LEAN_AND_MEAN
1179#if defined(WINAPI_FAMILY) && ((defined(WINAPI_FAMILY_APP) && WINAPI_FAMILY == WINAPI_FAMILY_APP) || (defined(WINAPI_FAMILY_GAMES) && WINAPI_FAMILY == WINAPI_FAMILY_GAMES))
1181#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
1182#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
1183#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
1188#if defined(__APPLE__)
1189#include <TargetConditionals.h>
1194#pragma warning (disable: 4127)
1195#pragma warning (disable: 4996)
1196#if defined(_MSC_VER) && _MSC_VER >= 1922
1197#pragma warning (disable: 5054)
1199#pragma warning (disable: 26451)
1200#pragma warning (disable: 26495)
1201#pragma warning (disable: 26812)
1205#if defined(__clang__)
1206#if __has_warning("-Wunknown-warning-option")
1207#pragma clang diagnostic ignored "-Wunknown-warning-option"
1209#pragma clang diagnostic ignored "-Wunknown-pragmas"
1210#pragma clang diagnostic ignored "-Wold-style-cast"
1211#pragma clang diagnostic ignored "-Wfloat-equal"
1212#pragma clang diagnostic ignored "-Wformat"
1213#pragma clang diagnostic ignored "-Wformat-nonliteral"
1214#pragma clang diagnostic ignored "-Wformat-pedantic"
1215#pragma clang diagnostic ignored "-Wexit-time-destructors"
1216#pragma clang diagnostic ignored "-Wglobal-constructors"
1217#pragma clang diagnostic ignored "-Wsign-conversion"
1218#pragma clang diagnostic ignored "-Wint-to-void-pointer-cast"
1219#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
1220#pragma clang diagnostic ignored "-Wdouble-promotion"
1221#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion"
1222#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
1223#pragma clang diagnostic ignored "-Wnontrivial-memaccess"
1224#pragma clang diagnostic ignored "-Wswitch-default"
1225#elif defined(__GNUC__)
1227#pragma GCC diagnostic ignored "-Wpragmas"
1228#pragma GCC diagnostic ignored "-Wunused-function"
1229#pragma GCC diagnostic ignored "-Wint-to-pointer-cast"
1230#pragma GCC diagnostic ignored "-Wfloat-equal"
1231#pragma GCC diagnostic ignored "-Wformat"
1232#pragma GCC diagnostic ignored "-Wdouble-promotion"
1233#pragma GCC diagnostic ignored "-Wconversion"
1234#pragma GCC diagnostic ignored "-Wformat-nonliteral"
1235#pragma GCC diagnostic ignored "-Wstrict-overflow"
1236#pragma GCC diagnostic ignored "-Wclass-memaccess"
1237#pragma GCC diagnostic ignored "-Wcast-qual"
1241#define IMGUI_DEBUG_NAV_SCORING 0
1242#define IMGUI_DEBUG_NAV_RECTS 0
1319#ifndef IMGUI_DISABLE_DEBUG_TOOLS
1339static void RenderWindowDecorations(
ImGuiWindow* window,
const ImRect& title_bar_rect,
bool title_bar_is_highlight,
bool handle_borders_and_resize_grips,
int resize_grip_count,
const ImU32 resize_grip_col[4],
float resize_grip_draw_size);
1394#ifndef IMGUI_DISABLE_DEFAULT_ALLOCATORS
1526 memset(
this, 0,
sizeof(*
this));
1542#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1642 if ((c & 0xFC00) == 0xD800)
1653 if ((c & 0xFC00) != 0xDC00)
1659#if IM_UNICODE_CODEPOINT_MAX == 0xFFFF
1675 while (*utf8_chars != 0)
1700 key_data->
Down =
false;
1714 key_data->
Down =
false;
1729#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
1742 if (e->
Type != type)
1783 const bool latest_key_down = latest_event ? latest_event->
Key.
Down : key_data->
Down;
1785 if (latest_key_down == down && latest_key_analog == analog_value)
1841 if (latest_pos.
x == pos.x && latest_pos.
y == pos.y)
1874 if (latest_button_down == down)
1942 if (latest_viewport_id == viewport_id)
1973 memset(
this, 0,
sizeof(*
this));
1986 float p_closest_dist2 = FLT_MAX;
1987 float t_step = 1.0f / (float)num_segments;
1988 for (
int i_step = 1; i_step <= num_segments; i_step++)
1993 if (dist2 < p_closest_dist2)
1996 p_closest_dist2 = dist2;
2004static void ImBezierCubicClosestPointCasteljauStep(
const ImVec2& p,
ImVec2& p_closest,
ImVec2& p_last,
float& p_closest_dist2,
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
float tess_tol,
int level)
2008 float d2 = ((x2 - x4) * dy - (y2 - y4) * dx);
2009 float d3 = ((x3 - x4) * dy - (y3 - y4) * dx);
2010 d2 = (d2 >= 0) ? d2 : -d2;
2011 d3 = (d3 >= 0) ? d3 : -d3;
2012 if ((d2 + d3) * (d2 + d3) < tess_tol * (dx * dx + dy * dy))
2014 ImVec2 p_current(x4, y4);
2017 if (dist2 < p_closest_dist2)
2020 p_closest_dist2 = dist2;
2024 else if (level < 10)
2026 float x12 = (x1 + x2)*0.5f, y12 = (y1 + y2)*0.5f;
2027 float x23 = (x2 + x3)*0.5f, y23 = (y2 + y3)*0.5f;
2028 float x34 = (x3 + x4)*0.5f, y34 = (y3 + y4)*0.5f;
2029 float x123 = (x12 + x23)*0.5f, y123 = (y12 + y23)*0.5f;
2030 float x234 = (x23 + x34)*0.5f, y234 = (y23 + y34)*0.5f;
2031 float x1234 = (x123 + x234)*0.5f, y1234 = (y123 + y234)*0.5f;
2032 ImBezierCubicClosestPointCasteljauStep(p, p_closest, p_last, p_closest_dist2, x1, y1, x12, y12, x123, y123, x1234, y1234, tess_tol, level + 1);
2033 ImBezierCubicClosestPointCasteljauStep(p, p_closest, p_last, p_closest_dist2, x1234, y1234, x234, y234, x34, y34, x4, y4, tess_tol, level + 1);
2044 float p_closest_dist2 = FLT_MAX;
2045 ImBezierCubicClosestPointCasteljauStep(p, p_closest, p_last, p_closest_dist2, p1.
x, p1.
y, p2.
x, p2.
y, p3.
x, p3.
y, p4.
x, p4.
y, tess_tol, 0);
2053 float dot = ap.
x * ab_dir.
x + ap.
y * ab_dir.
y;
2056 float ab_len_sqr = ab_dir.
x * ab_dir.
x + ab_dir.
y * ab_dir.
y;
2057 if (dot > ab_len_sqr)
2059 return a + ab_dir * dot / ab_len_sqr;
2064 bool b1 = ((p.
x - b.
x) * (a.
y - b.
y) - (p.
y - b.
y) * (a.
x - b.
x)) < 0.0f;
2065 bool b2 = ((p.
x - c.
x) * (b.
y - c.
y) - (p.
y - c.
y) * (b.
x - c.
x)) < 0.0f;
2066 bool b3 = ((p.
x - a.
x) * (c.
y - a.
y) - (p.
y - a.
y) * (c.
x - a.
x)) < 0.0f;
2067 return ((b1 == b2) && (b2 == b3));
2075 const float denom = v0.
x * v1.
y - v1.
x * v0.
y;
2076 out_v = (v2.
x * v1.
y - v1.
x * v2.
y) / denom;
2077 out_w = (v0.
x * v2.
y - v2.
x * v0.
y) / denom;
2078 out_u = 1.0f - out_v - out_w;
2089 float m =
ImMin(dist2_ab,
ImMin(dist2_bc, dist2_ca));
2112 while (count > 0 && (d =
ImToUpper(*str2) -
ImToUpper(*str1)) == 0 && *str1) { str1++; str2++; count--; }
2121 strncpy(dst, src, count - 1);
2129 return (
char*)memcpy(buf, (
const void*)str, len + 1);
2135 return memcpy(dst, src, size);
2140 size_t dst_buf_size = p_dst_size ? *p_dst_size :
ImStrlen(dst) + 1;
2141 size_t src_size =
ImStrlen(src) + 1;
2142 if (dst_buf_size < src_size)
2147 *p_dst_size = src_size;
2149 return (
char*)memcpy(dst, (
const void*)src, src_size);
2154 const char* p = (
const char*)
ImMemchr(str, (
int)c, str_end - str);
2169 const char* p = (
const char*)
ImMemchr(str,
'\n', str_end - str);
2170 return p ? p : str_end;
2173const char*
ImStrbol(
const char* buf_mid_line,
const char* buf_begin)
2176 while (buf_mid_line > buf_begin && buf_mid_line[-1] !=
'\n')
2178 return buf_mid_line;
2181const char*
ImStristr(
const char* haystack,
const char* haystack_end,
const char* needle,
const char* needle_end)
2184 needle_end = needle +
ImStrlen(needle);
2186 const char un0 = (char)
ImToUpper(*needle);
2187 while ((!haystack_end && *haystack) || (haystack_end && haystack < haystack_end))
2191 const char* b = needle + 1;
2192 for (
const char* a = haystack + 1; b < needle_end; a++, b++)
2195 if (b == needle_end)
2207 while (p[0] ==
' ' || p[0] ==
'\t')
2212 while (p > p_start && (p[-1] ==
' ' || p[-1] ==
'\t'))
2215 memmove(buf, p_start, p - p_start);
2216 buf[p - p_start] = 0;
2221 while (str[0] ==
' ' || str[0] ==
'\t')
2229#ifndef IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS
2235#ifdef IMGUI_USE_STB_SPRINTF
2236#ifndef IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION
2237#define STB_SPRINTF_IMPLEMENTATION
2239#ifdef IMGUI_STB_SPRINTF_FILENAME
2240#include IMGUI_STB_SPRINTF_FILENAME
2242#include "stb_sprintf.h"
2246#if defined(_MSC_VER) && !defined(vsnprintf)
2247#define vsnprintf _vsnprintf
2253 va_start(args, fmt);
2254#ifdef IMGUI_USE_STB_SPRINTF
2255 int w = stbsp_vsnprintf(buf, (
int)buf_size, fmt, args);
2257 int w = vsnprintf(buf, buf_size, fmt, args);
2262 if (w == -1 || w >= (
int)buf_size)
2263 w = (int)buf_size - 1;
2270#ifdef IMGUI_USE_STB_SPRINTF
2271 int w = stbsp_vsnprintf(buf, (
int)buf_size, fmt, args);
2273 int w = vsnprintf(buf, buf_size, fmt, args);
2277 if (w == -1 || w >= (
int)buf_size)
2278 w = (int)buf_size - 1;
2287 va_start(args, fmt);
2299 if (fmt[0] ==
'%' && fmt[1] ==
's' && fmt[2] == 0)
2301 const char* buf = va_arg(args,
const char*);
2305 if (out_buf_end) { *out_buf_end = buf +
ImStrlen(buf); }
2307 else if (fmt[0] ==
'%' && fmt[1] ==
'.' && fmt[2] ==
'*' && fmt[3] ==
's' && fmt[4] == 0)
2309 int buf_len = va_arg(args,
int);
2310 const char* buf = va_arg(args,
const char*);
2314 buf_len =
ImMin(buf_len, 6);
2317 *out_buf_end = buf + buf_len;
2327#ifndef IMGUI_ENABLE_SSE4_2_CRC
2333#ifdef IMGUI_USE_LEGACY_CRC32_ADLER
2335 0x00000000,0x77073096,0xEE0E612C,0x990951BA,0x076DC419,0x706AF48F,0xE963A535,0x9E6495A3,0x0EDB8832,0x79DCB8A4,0xE0D5E91E,0x97D2D988,0x09B64C2B,0x7EB17CBD,0xE7B82D07,0x90BF1D91,
2336 0x1DB71064,0x6AB020F2,0xF3B97148,0x84BE41DE,0x1ADAD47D,0x6DDDE4EB,0xF4D4B551,0x83D385C7,0x136C9856,0x646BA8C0,0xFD62F97A,0x8A65C9EC,0x14015C4F,0x63066CD9,0xFA0F3D63,0x8D080DF5,
2337 0x3B6E20C8,0x4C69105E,0xD56041E4,0xA2677172,0x3C03E4D1,0x4B04D447,0xD20D85FD,0xA50AB56B,0x35B5A8FA,0x42B2986C,0xDBBBC9D6,0xACBCF940,0x32D86CE3,0x45DF5C75,0xDCD60DCF,0xABD13D59,
2338 0x26D930AC,0x51DE003A,0xC8D75180,0xBFD06116,0x21B4F4B5,0x56B3C423,0xCFBA9599,0xB8BDA50F,0x2802B89E,0x5F058808,0xC60CD9B2,0xB10BE924,0x2F6F7C87,0x58684C11,0xC1611DAB,0xB6662D3D,
2339 0x76DC4190,0x01DB7106,0x98D220BC,0xEFD5102A,0x71B18589,0x06B6B51F,0x9FBFE4A5,0xE8B8D433,0x7807C9A2,0x0F00F934,0x9609A88E,0xE10E9818,0x7F6A0DBB,0x086D3D2D,0x91646C97,0xE6635C01,
2340 0x6B6B51F4,0x1C6C6162,0x856530D8,0xF262004E,0x6C0695ED,0x1B01A57B,0x8208F4C1,0xF50FC457,0x65B0D9C6,0x12B7E950,0x8BBEB8EA,0xFCB9887C,0x62DD1DDF,0x15DA2D49,0x8CD37CF3,0xFBD44C65,
2341 0x4DB26158,0x3AB551CE,0xA3BC0074,0xD4BB30E2,0x4ADFA541,0x3DD895D7,0xA4D1C46D,0xD3D6F4FB,0x4369E96A,0x346ED9FC,0xAD678846,0xDA60B8D0,0x44042D73,0x33031DE5,0xAA0A4C5F,0xDD0D7CC9,
2342 0x5005713C,0x270241AA,0xBE0B1010,0xC90C2086,0x5768B525,0x206F85B3,0xB966D409,0xCE61E49F,0x5EDEF90E,0x29D9C998,0xB0D09822,0xC7D7A8B4,0x59B33D17,0x2EB40D81,0xB7BD5C3B,0xC0BA6CAD,
2343 0xEDB88320,0x9ABFB3B6,0x03B6E20C,0x74B1D29A,0xEAD54739,0x9DD277AF,0x04DB2615,0x73DC1683,0xE3630B12,0x94643B84,0x0D6D6A3E,0x7A6A5AA8,0xE40ECF0B,0x9309FF9D,0x0A00AE27,0x7D079EB1,
2344 0xF00F9344,0x8708A3D2,0x1E01F268,0x6906C2FE,0xF762575D,0x806567CB,0x196C3671,0x6E6B06E7,0xFED41B76,0x89D32BE0,0x10DA7A5A,0x67DD4ACC,0xF9B9DF6F,0x8EBEEFF9,0x17B7BE43,0x60B08ED5,
2345 0xD6D6A3E8,0xA1D1937E,0x38D8C2C4,0x4FDFF252,0xD1BB67F1,0xA6BC5767,0x3FB506DD,0x48B2364B,0xD80D2BDA,0xAF0A1B4C,0x36034AF6,0x41047A60,0xDF60EFC3,0xA867DF55,0x316E8EEF,0x4669BE79,
2346 0xCB61B38C,0xBC66831A,0x256FD2A0,0x5268E236,0xCC0C7795,0xBB0B4703,0x220216B9,0x5505262F,0xC5BA3BBE,0xB2BD0B28,0x2BB45A92,0x5CB36A04,0xC2D7FFA7,0xB5D0CF31,0x2CD99E8B,0x5BDEAE1D,
2347 0x9B64C2B0,0xEC63F226,0x756AA39C,0x026D930A,0x9C0906A9,0xEB0E363F,0x72076785,0x05005713,0x95BF4A82,0xE2B87A14,0x7BB12BAE,0x0CB61B38,0x92D28E9B,0xE5D5BE0D,0x7CDCEFB7,0x0BDBDF21,
2348 0x86D3D2D4,0xF1D4E242,0x68DDB3F8,0x1FDA836E,0x81BE16CD,0xF6B9265B,0x6FB077E1,0x18B74777,0x88085AE6,0xFF0F6A70,0x66063BCA,0x11010B5C,0x8F659EFF,0xF862AE69,0x616BFFD3,0x166CCF45,
2349 0xA00AE278,0xD70DD2EE,0x4E048354,0x3903B3C2,0xA7672661,0xD06016F7,0x4969474D,0x3E6E77DB,0xAED16A4A,0xD9D65ADC,0x40DF0B66,0x37D83BF0,0xA9BCAE53,0xDEBB9EC5,0x47B2CF7F,0x30B5FFE9,
2350 0xBDBDF21C,0xCABAC28A,0x53B39330,0x24B4A3A6,0xBAD03605,0xCDD70693,0x54DE5729,0x23D967BF,0xB3667A2E,0xC4614AB8,0x5D681B02,0x2A6F2B94,0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D,
2353 0x00000000,0xF26B8303,0xE13B70F7,0x1350F3F4,0xC79A971F,0x35F1141C,0x26A1E7E8,0xD4CA64EB,0x8AD958CF,0x78B2DBCC,0x6BE22838,0x9989AB3B,0x4D43CFD0,0xBF284CD3,0xAC78BF27,0x5E133C24,
2354 0x105EC76F,0xE235446C,0xF165B798,0x030E349B,0xD7C45070,0x25AFD373,0x36FF2087,0xC494A384,0x9A879FA0,0x68EC1CA3,0x7BBCEF57,0x89D76C54,0x5D1D08BF,0xAF768BBC,0xBC267848,0x4E4DFB4B,
2355 0x20BD8EDE,0xD2D60DDD,0xC186FE29,0x33ED7D2A,0xE72719C1,0x154C9AC2,0x061C6936,0xF477EA35,0xAA64D611,0x580F5512,0x4B5FA6E6,0xB93425E5,0x6DFE410E,0x9F95C20D,0x8CC531F9,0x7EAEB2FA,
2356 0x30E349B1,0xC288CAB2,0xD1D83946,0x23B3BA45,0xF779DEAE,0x05125DAD,0x1642AE59,0xE4292D5A,0xBA3A117E,0x4851927D,0x5B016189,0xA96AE28A,0x7DA08661,0x8FCB0562,0x9C9BF696,0x6EF07595,
2357 0x417B1DBC,0xB3109EBF,0xA0406D4B,0x522BEE48,0x86E18AA3,0x748A09A0,0x67DAFA54,0x95B17957,0xCBA24573,0x39C9C670,0x2A993584,0xD8F2B687,0x0C38D26C,0xFE53516F,0xED03A29B,0x1F682198,
2358 0x5125DAD3,0xA34E59D0,0xB01EAA24,0x42752927,0x96BF4DCC,0x64D4CECF,0x77843D3B,0x85EFBE38,0xDBFC821C,0x2997011F,0x3AC7F2EB,0xC8AC71E8,0x1C661503,0xEE0D9600,0xFD5D65F4,0x0F36E6F7,
2359 0x61C69362,0x93AD1061,0x80FDE395,0x72966096,0xA65C047D,0x5437877E,0x4767748A,0xB50CF789,0xEB1FCBAD,0x197448AE,0x0A24BB5A,0xF84F3859,0x2C855CB2,0xDEEEDFB1,0xCDBE2C45,0x3FD5AF46,
2360 0x7198540D,0x83F3D70E,0x90A324FA,0x62C8A7F9,0xB602C312,0x44694011,0x5739B3E5,0xA55230E6,0xFB410CC2,0x092A8FC1,0x1A7A7C35,0xE811FF36,0x3CDB9BDD,0xCEB018DE,0xDDE0EB2A,0x2F8B6829,
2361 0x82F63B78,0x709DB87B,0x63CD4B8F,0x91A6C88C,0x456CAC67,0xB7072F64,0xA457DC90,0x563C5F93,0x082F63B7,0xFA44E0B4,0xE9141340,0x1B7F9043,0xCFB5F4A8,0x3DDE77AB,0x2E8E845F,0xDCE5075C,
2362 0x92A8FC17,0x60C37F14,0x73938CE0,0x81F80FE3,0x55326B08,0xA759E80B,0xB4091BFF,0x466298FC,0x1871A4D8,0xEA1A27DB,0xF94AD42F,0x0B21572C,0xDFEB33C7,0x2D80B0C4,0x3ED04330,0xCCBBC033,
2363 0xA24BB5A6,0x502036A5,0x4370C551,0xB11B4652,0x65D122B9,0x97BAA1BA,0x84EA524E,0x7681D14D,0x2892ED69,0xDAF96E6A,0xC9A99D9E,0x3BC21E9D,0xEF087A76,0x1D63F975,0x0E330A81,0xFC588982,
2364 0xB21572C9,0x407EF1CA,0x532E023E,0xA145813D,0x758FE5D6,0x87E466D5,0x94B49521,0x66DF1622,0x38CC2A06,0xCAA7A905,0xD9F75AF1,0x2B9CD9F2,0xFF56BD19,0x0D3D3E1A,0x1E6DCDEE,0xEC064EED,
2365 0xC38D26C4,0x31E6A5C7,0x22B65633,0xD0DDD530,0x0417B1DB,0xF67C32D8,0xE52CC12C,0x1747422F,0x49547E0B,0xBB3FFD08,0xA86F0EFC,0x5A048DFF,0x8ECEE914,0x7CA56A17,0x6FF599E3,0x9D9E1AE0,
2366 0xD3D3E1AB,0x21B862A8,0x32E8915C,0xC083125F,0x144976B4,0xE622F5B7,0xF5720643,0x07198540,0x590AB964,0xAB613A67,0xB831C993,0x4A5A4A90,0x9E902E7B,0x6CFBAD78,0x7FAB5E8C,0x8DC0DD8F,
2367 0xE330A81A,0x115B2B19,0x020BD8ED,0xF0605BEE,0x24AA3F05,0xD6C1BC06,0xC5914FF2,0x37FACCF1,0x69E9F0D5,0x9B8273D6,0x88D28022,0x7AB90321,0xAE7367CA,0x5C18E4C9,0x4F48173D,0xBD23943E,
2368 0xF36E6F75,0x0105EC76,0x12551F82,0xE03E9C81,0x34F4F86A,0xC69F7B69,0xD5CF889D,0x27A40B9E,0x79B737BA,0x8BDCB4B9,0x988C474D,0x6AE7C44E,0xBE2DA0A5,0x4C4623A6,0x5F16D052,0xAD7D5351
2379 const unsigned char* data = (
const unsigned char*)data_p;
2380 const unsigned char *data_end = (
const unsigned char*)data_p + data_size;
2381#ifndef IMGUI_ENABLE_SSE4_2_CRC
2383 while (data < data_end)
2384 crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ *data++];
2387 while (data + 4 <= data_end)
2389 crc = _mm_crc32_u32(crc, *(
ImU32*)data);
2392 while (data < data_end)
2393 crc = _mm_crc32_u8(crc, *data++);
2408 const unsigned char* data = (
const unsigned char*)data_p;
2409#ifndef IMGUI_ENABLE_SSE4_2_CRC
2414 while (data_size-- != 0)
2416 unsigned char c = *data++;
2417 if (c ==
'#' && data_size >= 2 && data[0] ==
'#' && data[1] ==
'#')
2419#ifndef IMGUI_ENABLE_SSE4_2_CRC
2420 crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c];
2422 crc = _mm_crc32_u8(crc, c);
2428 while (
unsigned char c = *data++)
2430 if (c ==
'#' && data[0] ==
'#' && data[1] ==
'#')
2432#ifndef IMGUI_ENABLE_SSE4_2_CRC
2433 crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c];
2435 crc = _mm_crc32_u8(crc, c);
2447#ifndef IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS
2451#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && (defined(__MINGW32__) || (!defined(__CYGWIN__) && !defined(__GNUC__)))
2454 const int filename_wsize = ::MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
2455 const int mode_wsize = ::MultiByteToWideChar(CP_UTF8, 0, mode, -1, NULL, 0);
2459 wchar_t local_temp_stack[FILENAME_MAX];
2461 if (filename_wsize + mode_wsize >
IM_ARRAYSIZE(local_temp_stack))
2462 local_temp_heap.
resize(filename_wsize + mode_wsize);
2463 wchar_t* filename_wbuf = local_temp_heap.
Data ? local_temp_heap.
Data : local_temp_stack;
2464 wchar_t* mode_wbuf = filename_wbuf + filename_wsize;
2465 ::MultiByteToWideChar(CP_UTF8, 0, filename, -1, filename_wbuf, filename_wsize);
2466 ::MultiByteToWideChar(CP_UTF8, 0, mode, -1, mode_wbuf, mode_wsize);
2467 return ::_wfopen(filename_wbuf, mode_wbuf);
2469 return fopen(filename, mode);
2483void*
ImFileLoadToMemory(
const char* filename,
const char* mode,
size_t* out_file_size,
int padding_bytes)
2490 if ((f =
ImFileOpen(filename, mode)) == NULL)
2494 if (file_size == (
size_t)-1)
2500 void* file_data =
IM_ALLOC(file_size + padding_bytes);
2501 if (file_data == NULL)
2506 if (
ImFileRead(file_data, 1, file_size, f) != file_size)
2512 if (padding_bytes > 0)
2513 memset((
void*)(((
char*)file_data) + file_size), 0, (
size_t)padding_bytes);
2517 *out_file_size = file_size;
2533 static const char lengths[32] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 4, 0 };
2534 static const int masks[] = { 0x00, 0x7f, 0x1f, 0x0f, 0x07 };
2535 static const uint32_t mins[] = { 0x400000, 0, 0x80, 0x800, 0x10000 };
2536 static const int shiftc[] = { 0, 18, 12, 6, 0 };
2537 static const int shifte[] = { 0, 6, 4, 2, 0 };
2538 int len = lengths[*(
const unsigned char*)in_text >> 3];
2539 int wanted = len + (len ? 0 : 1);
2541 if (in_text_end == NULL)
2542 in_text_end = in_text + wanted;
2547 s[0] = in_text + 0 < in_text_end ? in_text[0] : 0;
2548 s[1] = in_text + 1 < in_text_end ? in_text[1] : 0;
2549 s[2] = in_text + 2 < in_text_end ? in_text[2] : 0;
2550 s[3] = in_text + 3 < in_text_end ? in_text[3] : 0;
2553 *out_char = (uint32_t)(s[0] & masks[len]) << 18;
2554 *out_char |= (uint32_t)(s[1] & 0x3f) << 12;
2555 *out_char |= (uint32_t)(s[2] & 0x3f) << 6;
2556 *out_char |= (uint32_t)(s[3] & 0x3f) << 0;
2557 *out_char >>= shiftc[len];
2561 e = (*out_char < mins[len]) << 6;
2562 e |= ((*out_char >> 11) == 0x1b) << 7;
2564 e |= (s[1] & 0xc0) >> 2;
2565 e |= (s[2] & 0xc0) >> 4;
2576 wanted =
ImMin(wanted, !!s[0] + !!s[1] + !!s[2] + !!s[3]);
2586 ImWchar* buf_end = buf + buf_size;
2587 while (buf_out < buf_end - 1 && (!in_text_end || in_text < in_text_end) && *in_text)
2594 if (in_text_remaining)
2595 *in_text_remaining = in_text;
2596 return (
int)(buf_out - buf);
2602 while ((!in_text_end || in_text < in_text_end) && *in_text)
2621 if (buf_size < 2)
return 0;
2622 buf[0] = (char)(0xc0 + (c >> 6));
2623 buf[1] = (char)(0x80 + (c & 0x3f));
2628 if (buf_size < 3)
return 0;
2629 buf[0] = (char)(0xe0 + (c >> 12));
2630 buf[1] = (char)(0x80 + ((c >> 6) & 0x3f));
2631 buf[2] = (char)(0x80 + ((c ) & 0x3f));
2636 if (buf_size < 4)
return 0;
2637 buf[0] = (char)(0xf0 + (c >> 18));
2638 buf[1] = (char)(0x80 + ((c >> 12) & 0x3f));
2639 buf[2] = (char)(0x80 + ((c >> 6) & 0x3f));
2640 buf[3] = (char)(0x80 + ((c ) & 0x3f));
2657 unsigned int unused = 0;
2663 if (c < 0x80)
return 1;
2664 if (c < 0x800)
return 2;
2665 if (c < 0x10000)
return 3;
2666 if (c <= 0x10FFFF)
return 4;
2672 char* buf_p = out_buf;
2673 const char* buf_end = out_buf + out_buf_size;
2674 while (buf_p < buf_end - 1 && (!in_text_end || in_text < in_text_end) && *in_text)
2676 unsigned int c = (
unsigned int)(*in_text++);
2683 return (
int)(buf_p - out_buf);
2688 int bytes_count = 0;
2689 while ((!in_text_end || in_text < in_text_end) && *in_text)
2691 unsigned int c = (
unsigned int)(*in_text++);
2702 while (in_text_curr > in_text_start)
2705 if ((*in_text_curr & 0xC0) != 0x80)
2706 return in_text_curr;
2708 return in_text_start;
2713 if (in_text_end == NULL)
2714 in_text_end = in_text +
ImStrlen(in_text);
2716 while (in_text < in_text_end)
2718 const char* line_end = (
const char*)
ImMemchr(in_text,
'\n', in_text_end - in_text);
2719 in_text = line_end ? line_end + 1 : in_text_end;
2743 float s = 1.0f / 255.0f;
2777 const float chroma = r - (g < b ? g : b);
2778 out_h =
ImFabs(
K + (g - b) / (6.f * chroma + 1e-20f));
2779 out_s = chroma / (r + 1e-20f);
2790 out_r = out_g = out_b = v;
2794 h =
ImFmod(h, 1.0f) / (60.0f / 360.0f);
2796 float f = h - (float)i;
2797 float p = v * (1.0f - s);
2798 float q = v * (1.0f - s * f);
2799 float t = v * (1.0f - s * (1.0f - f));
2803 case 0: out_r = v; out_g = t; out_b = p;
break;
2804 case 1: out_r = q; out_g = v; out_b = p;
break;
2805 case 2: out_r = p; out_g = v; out_b = t;
break;
2806 case 3: out_r = p; out_g = q; out_b = v;
break;
2807 case 4: out_r = t; out_g = p; out_b = v;
break;
2808 case 5:
default: out_r = v; out_g = p; out_b = q;
break;
2821 for (
size_t count = (
size_t)(in_end - in_p); count > 0; )
2823 size_t count2 = count >> 1;
2828 count -= count2 + 1;
2844 return (lhs_v > rhs_v ? +1 : lhs_v < rhs_v ? -1 : 0);
2863 return GetInt(key, default_val ? 1 : 0) != 0;
2893 return (
bool*)
GetIntRef(key, default_val ? 1 : 0);
2924 SetInt(key, val ? 1 : 0);
2947 for (
int i = 0; i <
Data.
Size; i++)
2975 return value_changed;
2982 const char* we = wb;
2985 if (*we == separator)
3022 text = text_end =
"";
3031 if (
ImStristr(text, text_end, f.b + 1, f.e) != NULL)
3037 if (
ImStristr(text, text_end, f.b, f.e) != NULL)
3056#if defined(__GNUC__) || defined(__clang__)
3057#define va_copy(dest, src) __builtin_va_copy(dest, src)
3059#define va_copy(dest, src) (dest = src)
3067 int len = str_end ? (int)(str_end - str) : (int)
ImStrlen(str);
3070 const int write_off = (Buf.Size != 0) ? Buf.Size : 1;
3071 const int needed_sz = write_off + len;
3072 if (write_off + len >= Buf.Capacity)
3074 int new_capacity = Buf.Capacity * 2;
3075 Buf.reserve(needed_sz > new_capacity ? needed_sz : new_capacity);
3078 Buf.resize(needed_sz);
3079 memcpy(&Buf[write_off - 1], str, (
size_t)len);
3080 Buf[write_off - 1 + len] = 0;
3086 va_start(args, fmt);
3087 appendfv(fmt, args);
3105 const int write_off = (Buf.Size != 0) ? Buf.Size : 1;
3106 const int needed_sz = write_off + len;
3107 if (write_off + len >= Buf.Capacity)
3109 int new_capacity = Buf.Capacity * 2;
3110 Buf.reserve(needed_sz > new_capacity ? needed_sz : new_capacity);
3113 Buf.resize(needed_sz);
3114 ImFormatStringV(&Buf[write_off - 1], (
size_t)len + 1, fmt, args_copy);
3120 IM_ASSERT(old_size >= 0 && new_size >= old_size && new_size >= EndOffset);
3121 if (old_size == new_size)
3123 if (EndOffset == 0 || base[EndOffset - 1] ==
'\n')
3124 LineOffsets.push_back(EndOffset);
3125 const char* base_end = base + new_size;
3126 for (
const char* p = base + old_size; (p = (
const char*)
ImMemchr(p,
'\n', base_end - p)) != 0; )
3128 LineOffsets.push_back((
int)(intptr_t)(p - base));
3129 EndOffset =
ImMax(EndOffset, new_size);
3146 if (ranges.
Size - offset <= 1)
3150 for (
int sort_end = ranges.
Size - offset - 1; sort_end > 0; --sort_end)
3151 for (
int i = offset; i < sort_end + offset; ++i)
3152 if (ranges[i].Min > ranges[i + 1].Min)
3153 ImSwap(ranges[i], ranges[i + 1]);
3156 for (
int i = 1 + offset; i < ranges.
Size; i++)
3158 IM_ASSERT(!ranges[i].PosToIndexConvert && !ranges[i - 1].PosToIndexConvert);
3159 if (ranges[i - 1].Max < ranges[i].Min)
3161 ranges[i - 1].Min =
ImMin(ranges[i - 1].Min, ranges[i].Min);
3162 ranges[i - 1].Max =
ImMax(ranges[i - 1].Max, ranges[i].Max);
3184 if (table->IsInsideRow)
3187 const int row_increase = (int)((off_y / line_height) + 0.5f);
3189 table->RowBgColorCounter += row_increase;
3195 memset(
this, 0,
sizeof(*
this));
3213 if (table->IsInsideRow)
3217 ItemsHeight = items_height;
3218 ItemsCount = items_count;
3239 if (ItemsCount >= 0 && ItemsCount < INT_MAX && DisplayStart >= 0)
3240 SeekCursorForItem(ItemsCount);
3244 data->StepNo = data->Ranges.Size;
3248 data->ListClipper->TempData = data;
3260 if (item_begin < item_end)
3271 float pos_y = (float)((
double)StartPosY + StartSeekOffsetY + (double)item_n * ItemsHeight);
3280 IM_ASSERT(data != NULL &&
"Called ImGuiListClipper::Step() too many times, or before ImGuiListClipper::Begin() ?");
3302 bool calc_clipping =
false;
3315 calc_clipping =
true;
3326 if (affected_by_floating_point_precision)
3338 IM_ASSERT(clipper->
ItemsHeight > 0.0f &&
"Unable to calculate item height! First item hasn't moved the cursor vertically!");
3339 calc_clipping =
true;
3343 const int already_submitted = clipper->
DisplayEnd;
3435 bool need_items_height = (ItemsHeight <= 0.0f);
3437 if (ret && (DisplayStart >= DisplayEnd))
3441 if (need_items_height && ItemsHeight > 0.0f)
3461 IM_ASSERT(
GImGui != NULL &&
"No current context. Did you call ImGui::CreateContext() and ImGui::SetCurrentContext() ?");
3469 c.
w *= style.
Alpha * alpha_mul;
3484 return style.
Colors[idx];
3490 alpha_mul *= style.
Alpha;
3491 if (alpha_mul >= 1.0f)
3494 a = (
ImU32)(a * alpha_mul);
3747 const char* text_display_end = text;
3749 text_end = (
const char*)-1;
3751 while (text_display_end < text_end && *text_display_end !=
'\0' && (text_display_end[0] !=
'#' || text_display_end[1] !=
'#'))
3753 return text_display_end;
3764 const char* text_display_end;
3765 if (hide_text_after_hash)
3773 text_display_end = text_end;
3776 if (text != text_display_end)
3792 if (text != text_end)
3809 const ImVec2 text_size = text_size_if_known ? *text_size_if_known :
CalcTextSize(text, text_display_end,
false, 0.0f);
3811 const ImVec2* clip_min = clip_rect ? &clip_rect->
Min : &pos_min;
3812 const ImVec2* clip_max = clip_rect ? &clip_rect->
Max : &pos_max;
3813 bool need_clipping = (pos.x + text_size.
x >= clip_max->
x) || (pos.y + text_size.
y >= clip_max->
y);
3815 need_clipping |= (pos.x < clip_min->
x) || (pos.y < clip_min->
y);
3818 if (align.
x > 0.0f) pos.x =
ImMax(pos.x, pos.x + (pos_max.
x - pos.x - text_size.
x) * align.
x);
3819 if (align.
y > 0.0f) pos.y =
ImMax(pos.y, pos.y + (pos_max.
y - pos.y - text_size.
y) * align.
y);
3824 ImVec4 fine_clip_rect(clip_min->
x, clip_min->
y, clip_max->
x, clip_max->
y);
3837 const int text_len = (int)(text_display_end - text);
3855 if (text_end_full == NULL)
3857 const ImVec2 text_size = text_size_if_known ? *text_size_if_known :
CalcTextSize(text, text_end_full,
false, 0.0f);
3863 if (text_size.
x > pos_max.
x - pos_min.
x)
3873 const char* text_end_ellipsis = NULL;
3878 const float text_avail_width =
ImMax((
ImMax(pos_max.
x, ellipsis_max_x) - ellipsis_width) - pos_min.
x, 1.0f);
3879 float text_size_clipped_x = font->
CalcTextSizeA(font_size, text_avail_width, 0.0f, text, text_end_full, &text_end_ellipsis).
x;
3880 while (text_end_ellipsis > text &&
ImCharIsBlankA(text_end_ellipsis[-1]))
3883 text_end_ellipsis--;
3884 text_size_clipped_x -= font->
CalcTextSizeA(font_size, FLT_MAX, 0.0f, text_end_ellipsis, text_end_ellipsis + 1).
x;
3889 ImVec4 cpu_fine_clip_rect(pos_min.
x, pos_min.
y, pos_max.
x, pos_max.
y);
3909 if (borders && border_size > 0.0f)
3921 if (border_size > 0.0f)
3942 ImRect display_rect = bb;
3944 const float thickness = 2.0f;
3951 const float distance = 3.0f + thickness * 0.5f;
3952 display_rect.Expand(
ImVec2(distance, distance));
3971 ImVec2 offset, size, uv[4];
3974 const ImVec2 pos = base_pos - offset;
3975 const float scale = base_scale * viewport->
DpiScale;
3981 draw_list->
AddImage(tex_ref, pos +
ImVec2(1, 0) * scale, pos + (
ImVec2(1, 0) + size) * scale, uv[2], uv[3], col_shadow);
3982 draw_list->
AddImage(tex_ref, pos +
ImVec2(2, 0) * scale, pos + (
ImVec2(2, 0) + size) * scale, uv[2], uv[3], col_shadow);
3983 draw_list->
AddImage(tex_ref, pos, pos + size * scale, uv[2], uv[3], col_border);
3984 draw_list->
AddImage(tex_ref, pos, pos + size * scale, uv[0], uv[1], col_fill);
3988 float a_max = a_min +
IM_PI * 1.65f;
3989 draw_list->
PathArcTo(pos +
ImVec2(14, -1) * scale, 6.0f * scale, a_min, a_max);
4009#ifdef IMGUI_SET_CURRENT_CONTEXT_FUNC
4010 IMGUI_SET_CURRENT_CONTEXT_FUNC(ctx);
4037 if (prev_ctx != NULL)
4074 InputTextState.Ctx =
this;
4076 Initialized =
false;
4081 FontSize = FontSizeBase = FontBakedScale = CurrentDpiScale = 0.0f;
4082 FontRasterizerDensity = 1.0f;
4084 if (shared_font_atlas == NULL)
4085 IO.Fonts->OwnerContext =
this;
4088 FrameCountEnded = FrameCountPlatformEnded = FrameCountRendered = -1;
4089 WithinEndChildID = 0;
4090 WithinFrameScope = WithinFrameScopeWithImplicitWindow =
false;
4091 GcCompactAll =
false;
4092 TestEngineHookItems =
false;
4094 memset(ContextName, 0,
sizeof(ContextName));
4097 InputEventsNextEventId = 1;
4099 WindowsActiveCount = 0;
4100 WindowsBorderHoverPadding = 0.0f;
4101 CurrentWindow = NULL;
4102 HoveredWindow = NULL;
4103 HoveredWindowUnderMovingWindow = NULL;
4104 HoveredWindowBeforeClear = NULL;
4105 MovingWindow = NULL;
4106 WheelingWindow = NULL;
4107 WheelingWindowStartFrame = WheelingWindowScrolledFrame = -1;
4108 WheelingWindowReleaseTimer = 0.0f;
4110 DebugDrawIdConflictsId = 0;
4111 DebugHookIdInfo = 0;
4112 HoveredId = HoveredIdPreviousFrame = 0;
4113 HoveredIdPreviousFrameItemCount = 0;
4114 HoveredIdAllowOverlap =
false;
4115 HoveredIdIsDisabled =
false;
4116 HoveredIdTimer = HoveredIdNotActiveTimer = 0.0f;
4117 ItemUnclipByLog =
false;
4119 ActiveIdIsAlive = 0;
4120 ActiveIdTimer = 0.0f;
4121 ActiveIdIsJustActivated =
false;
4122 ActiveIdAllowOverlap =
false;
4123 ActiveIdNoClearOnFocusLoss =
false;
4124 ActiveIdHasBeenPressedBefore =
false;
4125 ActiveIdHasBeenEditedBefore =
false;
4126 ActiveIdHasBeenEditedThisFrame =
false;
4127 ActiveIdFromShortcut =
false;
4128 ActiveIdClickOffset =
ImVec2(-1, -1);
4129 ActiveIdWindow = NULL;
4131 ActiveIdMouseButton = -1;
4132 ActiveIdPreviousFrame = 0;
4133 memset(&DeactivatedItemData, 0,
sizeof(DeactivatedItemData));
4134 memset(&ActiveIdValueOnActivation, 0,
sizeof(ActiveIdValueOnActivation));
4136 LastActiveIdTimer = 0.0f;
4138 LastKeyboardKeyPressTime = LastKeyModsChangeTime = LastKeyModsChangeFromNoneTime = -1.0;
4140 ActiveIdUsingNavDirMask = 0x00;
4141 ActiveIdUsingAllKeyboardKeys =
false;
4143 CurrentFocusScopeId = 0;
4145 DebugShowGroupRects =
false;
4147 CurrentViewport = NULL;
4148 MouseViewport = MouseLastHoveredViewport = NULL;
4149 PlatformLastFocusedViewportId = 0;
4150 ViewportCreatedCount = PlatformWindowsCreatedCount = 0;
4151 ViewportFocusedStampCount = 0;
4153 NavCursorVisible =
false;
4154 NavHighlightItemUnderNav =
false;
4155 NavMousePosDirty =
false;
4156 NavIdIsAlive =
false;
4159 NavFocusScopeId = NavActivateId = NavActivateDownId = NavActivatePressedId = 0;
4161 NavNextActivateId = 0;
4163 NavHighlightActivatedId = 0;
4164 NavHighlightActivatedTimer = 0.0f;
4167 NavCursorHideFrames = 0;
4169 NavAnyRequest =
false;
4170 NavInitRequest =
false;
4171 NavInitRequestFromMove =
false;
4172 NavMoveSubmitted =
false;
4173 NavMoveScoringItems =
false;
4174 NavMoveForwardToNextFrame =
false;
4178 NavMoveDir = NavMoveDirForDebug = NavMoveClipDir =
ImGuiDir_None;
4179 NavScoringDebugCount = 0;
4181 NavTabbingCounter = 0;
4183 NavJustMovedFromFocusScopeId = NavJustMovedToId = NavJustMovedToFocusScopeId = 0;
4185 NavJustMovedToIsTabbing =
false;
4186 NavJustMovedToHasSelectionData =
false;
4190 ConfigNavWindowingWithGamepad =
true;
4193 NavWindowingTarget = NavWindowingTargetAnim = NavWindowingListWindow = NULL;
4195 NavWindowingTimer = NavWindowingHighlightAlpha = 0.0f;
4196 NavWindowingToggleLayer =
false;
4201 DragDropActive = DragDropWithinSource = DragDropWithinTarget =
false;
4203 DragDropSourceFrameCount = -1;
4204 DragDropMouseButton = -1;
4205 DragDropTargetId = 0;
4207 DragDropAcceptIdCurrRectSurface = 0.0f;
4208 DragDropAcceptIdPrev = DragDropAcceptIdCurr = 0;
4209 DragDropAcceptFrameCount = -1;
4210 DragDropHoldJustPressedId = 0;
4211 memset(DragDropPayloadBufLocal, 0,
sizeof(DragDropPayloadBufLocal));
4213 ClipperTempDataStacked = 0;
4215 CurrentTable = NULL;
4216 TablesTempDataStacked = 0;
4217 CurrentTabBar = NULL;
4218 CurrentMultiSelect = NULL;
4219 MultiSelectTempDataStacked = 0;
4221 HoverItemDelayId = HoverItemDelayIdPreviousFrame = HoverItemUnlockedStationaryId = HoverWindowUnlockedStationaryId = 0;
4222 HoverItemDelayTimer = HoverItemDelayClearTimer = 0.0f;
4225 MouseStationaryTimer = 0.0f;
4229 memset(&DataTypeZeroValue, 0,
sizeof(DataTypeZeroValue));
4230 BeginMenuDepth = BeginComboDepth = 0;
4232 ColorEditCurrentID = ColorEditSavedID = 0;
4233 ColorEditSavedHue = ColorEditSavedSat = 0.0f;
4234 ColorEditSavedColor = 0;
4235 WindowResizeRelativeMode =
false;
4236 ScrollbarSeekMode = 0;
4237 ScrollbarClickDeltaToGrabCenter = 0.0f;
4238 SliderGrabClickOffset = 0.0f;
4239 SliderCurrentAccum = 0.0f;
4240 SliderCurrentAccumDirty =
false;
4241 DragCurrentAccumDirty =
false;
4242 DragCurrentAccum = 0.0f;
4243 DragSpeedDefaultRatio = 1.0f / 100.0f;
4244 DisabledAlphaBackup = 0.0f;
4245 DisabledStackSize = 0;
4246 TooltipOverrideCount = 0;
4247 TooltipPreviousWindow = NULL;
4249 PlatformImeData.InputPos =
ImVec2(0.0f, 0.0f);
4250 PlatformImeDataPrev.InputPos =
ImVec2(-1.0f, -1.0f);
4252 DockNodeWindowMenuHandler = NULL;
4254 SettingsLoaded =
false;
4255 SettingsDirtyTimer = 0.0f;
4258 memset(LocalizationTable, 0,
sizeof(LocalizationTable));
4263 LogNextPrefix = LogNextSuffix = NULL;
4265 LogLinePosY = FLT_MAX;
4266 LogLineFirstItem =
false;
4268 LogDepthToExpand = LogDepthToExpandDefault = 2;
4270 ErrorCallback = NULL;
4271 ErrorCallbackUserData = NULL;
4273 ErrorCountCurrentFrame = 0;
4274 StackSizesInBeginForCurrentWindow = NULL;
4276 DebugDrawIdConflictsCount = 0;
4279 DebugLogSkippedErrors = 0;
4281 DebugLogAutoDisableFrames = 0;
4282 DebugLocateFrames = 0;
4283 DebugBeginReturnValueCullDepth = -1;
4284 DebugItemPickerActive =
false;
4286 DebugItemPickerBreakId = 0;
4287 DebugFlashStyleColorTime = 0.0f;
4289 DebugHoveredDockNode = NULL;
4292 DebugBreakInWindow = 0;
4293 DebugBreakInTable = 0;
4294 DebugBreakInLocateId =
false;
4298 memset(FramerateSecPerFrame, 0,
sizeof(FramerateSecPerFrame));
4299 FramerateSecPerFrameIdx = FramerateSecPerFrameCount = 0;
4300 FramerateSecPerFrameAccum = 0.0f;
4301 WantCaptureMouseNextFrame = WantCaptureKeyboardNextFrame = WantTextInputNextFrame = -1;
4302 memset(TempKeychordName, 0,
sizeof(TempKeychordName));
4352#ifdef IMGUI_HAS_DOCK
4359#ifdef IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS
4360 DebugLog(
"IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS is enabled.\nMust disable after use! Otherwise Dear ImGui will run slower.\n");
4454#ifndef IMGUI_DISABLE_TTY_FUNCTIONS
4483 if (hook.
HookId == hook_id)
4493 if (hook.
Type == hook_type)
4504 memset(
this, 0,
sizeof(*
this));
4549 bool backup_skip_items = window->
SkipItems;
4715 if (focused_root_window->WasActive && focused_root_window != window->
RootWindowDockTree)
4719 bool want_inhibit =
false;
4721 want_inhibit =
true;
4723 want_inhibit =
true;
4754 return user_flags | shared_flags;
4862#ifndef IMGUI_DISABLE_DEBUG_TOOLS
4867 window->
DrawList->
AddRect(bb.
Min -
ImVec2(1,1), bb.
Max +
ImVec2(1,1),
IM_COL32(255, 0, 0, 255), 0.0f,
ImDrawFlags_None, 2.0f);
4925#ifndef IMGUI_DISABLE_DEBUG_TOOLS
4986 if (wrap_pos_x < 0.0f)
4991 if (wrap_pos_x == 0.0f)
5000 else if (wrap_pos_x > 0.0f)
5005 return ImMax(wrap_pos_x - pos.x, 1.0f);
5012#ifndef IMGUI_DISABLE_DEBUG_TOOLS
5014 DebugAllocHook(&ctx->DebugAllocInfo, ctx->FrameCount, ptr, size);
5022#ifndef IMGUI_DISABLE_DEBUG_TOOLS
5025 DebugAllocHook(&ctx->DebugAllocInfo, ctx->FrameCount, ptr, (
size_t)-1);
5042 if (size != (
size_t)-1)
5076 IM_ASSERT(
GImGui != NULL &&
"No current context. Did you call ImGui::CreateContext() and ImGui::SetCurrentContext() ?");
5089 IM_ASSERT(
GImGui != NULL &&
"No current context. Did you call ImGui::CreateContext() and ImGui::SetCurrentContext()?");
5124 if (draw_list == NULL)
5144 if (viewport == NULL)
5151 if (viewport == NULL)
5175 bool can_move_window =
true;
5177 can_move_window =
false;
5180 can_move_window =
false;
5181 if (can_move_window)
5189 bool can_undock_node =
false;
5197 can_undock_node =
true;
5202 if (can_undock_node && dragging)
5204 else if (!can_undock_node && (clicked || dragging) && g.
MovingWindow != window)
5225 const bool window_disappared = (!moving_window->
WasActive && !moving_window->
Active);
5229 if (moving_window->
Pos.
x != pos.x || moving_window->
Pos.
y != pos.y)
5242 if (!window_disappared)
5255 moving_window->
Viewport->
Flags &= ~ImGuiViewportFlags_NoInputs;
5296 if (root_window != NULL && !is_closed_popup)
5311 else if (root_window == NULL && g.
NavWindow != NULL)
5335 window->
Pos += delta;
5348 window->
Pos =
ImFloor((window->
Pos - origin) * scale + origin);
5373 bool clear_hovered_windows =
false;
5381 clear_hovered_windows =
true;
5385 clear_hovered_windows =
true;
5390 const bool has_open_modal = (modal_window != NULL);
5391 int mouse_earliest_down = -1;
5392 bool mouse_any_down =
false;
5403 mouse_earliest_down = i;
5405 const bool mouse_avail = (mouse_earliest_down == -1) || io.
MouseDownOwned[mouse_earliest_down];
5411 if (!mouse_avail && !mouse_dragging_extern_payload)
5412 clear_hovered_windows =
true;
5414 if (clear_hovered_windows)
5433 if ((g.
ActiveId != 0) || (modal_window != NULL))
5490 ImRect virtual_space(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX);
5510 IM_ASSERT(
GImGui != NULL &&
"No current context. Did you call ImGui::CreateContext() and ImGui::SetCurrentContext() ?");
5515 for (
int n = g.
Hooks.
Size - 1; n >= 0; n--)
5746#ifndef IMGUI_DISABLE_DEBUG_TOOLS
5757 DebugLog(
"(Debug Log: Auto-disabled some ImGuiDebugLogFlags after 2 frames)\n");
5768 Begin(
"Debug##Default");
5777#ifndef IMGUI_DISABLE_DEBUG_TOOLS
5806 for (
int i = 0; i < count; i++)
5876 draw_data->
Valid =
true;
5897 window->
DrawList->
PushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
5958 ImGuiWindow* bottom_most_visible_window = parent_window;
5967 bottom_most_visible_window = window;
5969 return bottom_most_visible_window;
5980 const bool dim_bg_for_modal = (modal_window != NULL);
5982 if (!dim_bg_for_modal && !dim_bg_for_window_list)
5985 ImGuiViewport* viewports_already_dimmed[2] = { NULL, NULL };
5986 if (dim_bg_for_modal)
5991 viewports_already_dimmed[0] = modal_window->
Viewport;
5993 else if (dim_bg_for_window_list)
6009 bb.
Expand(-distance - 1.0f);
6021 if (viewport == viewports_already_dimmed[0] || viewport == viewports_already_dimmed[1])
6060 if (viewport == NULL)
6085 if (is_delivered || is_elapsed)
6181 for (
int n = 0; n <
IM_ARRAYSIZE(windows_to_render_top_most); n++)
6209#ifndef IMGUI_DISABLE_DEBUG_TOOLS
6224 const char* text_display_end;
6225 if (hide_text_after_double_hash)
6228 text_display_end = text_end;
6231 const float font_size = g.
FontSize;
6232 if (text == text_display_end)
6233 return ImVec2(0.0f, font_size);
6234 ImVec2 text_size = font->
CalcTextSizeA(font_size, FLT_MAX, wrap_width, text, text_display_end, NULL);
6241 text_size.
x =
IM_TRUNC(text_size.
x + 0.99999f);
6256 ImGuiWindow* hovered_window_under_moving_window = NULL;
6260 if (find_first_and_in_any_viewport ==
false && g.
MovingWindow)
6293 if (
ImRect(hole_pos, hole_pos + hole_size).Contains(pos))
6297 if (find_first_and_in_any_viewport)
6299 hovered_window = window;
6304 if (hovered_window == NULL)
6305 hovered_window = window;
6308 hovered_window_under_moving_window = window;
6309 if (hovered_window && hovered_window_under_moving_window)
6314 *out_hovered_window = hovered_window;
6315 if (out_hovered_window_under_moving_window != NULL)
6316 *out_hovered_window_under_moving_window = hovered_window_under_moving_window;
6317 if (find_first_and_in_any_viewport ==
false && g.
MovingWindow)
6435#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
6489 return BeginChildEx(str_id,
id, size_arg, child_flags, window_flags);
6494 return BeginChildEx(NULL,
id, size_arg, child_flags, window_flags);
6505 IM_UNUSED(ImGuiChildFlags_SupportedMask_);
6506 IM_ASSERT((child_flags & ~ImGuiChildFlags_SupportedMask_) == 0 &&
"Illegal ImGuiChildFlags value. Did you pass ImGuiWindowFlags values instead of ImGuiChildFlags?");
6513#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
6520 child_flags &= ~ImGuiChildFlags_ResizeX;
6522 child_flags &= ~ImGuiChildFlags_ResizeY;
6558 child_flags &= ~ImGuiChildFlags_ResizeX;
6563 child_flags &= ~ImGuiChildFlags_ResizeY;
6578 const char* temp_window_name;
6593 const bool ret =
Begin(temp_window_name, NULL, window_flags);
6614 if (g.
ActiveId == temp_id_for_activation)
6620 SetActiveID(temp_id_for_activation, child_window);
6707 if (settings->
Size.
x > 0 && settings->
Size.
y > 0)
6724 if (settings != NULL)
6738 if (window->
Size.
x <= 0.0f)
6740 if (window->
Size.
y <= 0.0f)
6752 window->
Flags = flags;
6807 ImVec2 new_size = size_desired;
6830 return ImMax(new_size, size_min);
6835 bool preserve_old_content_sizes =
false;
6837 preserve_old_content_sizes =
true;
6839 preserve_old_content_sizes =
true;
6840 if (preserve_old_content_sizes)
6860 ImVec2 size_desired = size_contents + size_pad +
ImVec2(decoration_w_without_scrollbars, decoration_h_without_scrollbars);
6877 return ImMin(size_desired, size_max);
6897 if (will_have_scrollbar_x)
6899 if (will_have_scrollbar_y)
6901 return size_auto_fit;
6907 ImVec2 size_contents_current;
6908 ImVec2 size_contents_ideal;
6928 ImVec2 size_expected = pos_max - pos_min;
6931 if (corner_norm.
x == 0.0f)
6932 out_pos->
x -= (size_constrained.
x - size_expected.
x);
6933 if (corner_norm.
y == 0.0f)
6934 out_pos->
y -= (size_constrained.
y - size_expected.
y);
6935 *out_size = size_constrained;
6971 if (thickness == 0.0f)
6995 int n = (int)dir + 4;
7016 int ret_auto_fit_mask = 0x00;
7018 const float grip_hover_inner_size = (resize_grip_count > 0) ?
IM_TRUNC(grip_draw_size * 0.75f) : 0.0f;
7021 ImRect clamp_rect = visibility_rect;
7023 if (window_move_from_title_bar)
7026 ImVec2 pos_target(FLT_MAX, FLT_MAX);
7027 ImVec2 size_target(FLT_MAX, FLT_MAX);
7036 if (clip_with_viewport_rect)
7044 for (
int resize_grip_n = 0; resize_grip_n < resize_grip_count; resize_grip_n++)
7051 ImRect resize_rect(corner - def.
InnerDir * grip_hover_outer_size, corner + def.
InnerDir * grip_hover_inner_size);
7058 if (hovered || held)
7065 ret_auto_fit_mask = 0x03;
7075 corner_target =
ImClamp(corner_target, clamp_min, clamp_max);
7080 if (resize_grip_n == 0 || held || hovered)
7084 int resize_border_mask = 0x00;
7089 for (
int border_n = 0; border_n < 4; border_n++)
7091 if ((resize_border_mask & (1 << border_n)) == 0)
7104 if (hovered || held)
7111 if (border_n == 1 || border_n == 3)
7114 ret_auto_fit_mask |= (1 << axis);
7115 hovered = held =
false;
7134 const float border_target_rel_mode_for_axis = border_curr[axis] + g.
IO.
MouseDelta[axis];
7139 border_target[axis] = border_target_abs_mode_for_axis;
7142 bool ignore_resize =
false;
7146 border_target[axis] = border_target_rel_mode_for_axis;
7147 if (g.
IO.
MouseDelta[axis] == 0.0f || (g.
IO.
MouseDelta[axis] > 0.0f) == (border_target_rel_mode_for_axis > border_target_abs_mode_for_axis))
7148 ignore_resize =
true;
7154 border_target =
ImClamp(border_target, clamp_min, clamp_max);
7162 border_target.
x =
ImClamp(border_target.
x, border_limit_rect.
Min.
x, border_limit_rect.
Max.
x);
7164 border_target.
y =
ImClamp(border_target.
y, border_limit_rect.
Min.
y, border_limit_rect.
Max.
y);
7170 *border_hovered = border_n;
7172 *border_held = border_n;
7189 if (nav_resize_dir.
x != 0.0f || nav_resize_dir.
y != 0.0f)
7191 const float NAV_RESIZE_SPEED = 600.0f;
7199 if (accum_floored.
x != 0.0f || accum_floored.
y != 0.0f)
7211 if (size_target.
x != FLT_MAX && (window->
Size.
x != size_target.
x || window->
SizeFull.
x != size_target.
x))
7213 if (size_target.
y != FLT_MAX && (window->
Size.
y != size_target.
y || window->
SizeFull.
y != size_target.
y))
7215 if (pos_target.
x != FLT_MAX && window->
Pos.
x !=
ImTrunc(pos_target.
x))
7217 if (pos_target.
y != FLT_MAX && window->
Pos.
y !=
ImTrunc(pos_target.
y))
7223 if (*border_held != -1)
7226 return ret_auto_fit_mask;
7237 window->
Pos =
ImClamp(window->
Pos, visibility_rect.
Min - size_for_clamping, visibility_rect.
Max);
7257 else if (border_size > 0.0f)
7302 RenderFrame(title_bar_rect.
Min, title_bar_rect.
Max, title_bar_col,
true, window_rounding);
7310 bool is_docking_transparent_payload =
false;
7313 is_docking_transparent_payload =
true;
7319 if (is_docking_transparent_payload)
7325 bool override_alpha =
false;
7330 override_alpha =
true;
7332 if (is_docking_transparent_payload)
7335 override_alpha =
true;
7405 for (
int resize_grip_n = 0; resize_grip_n < resize_grip_count; resize_grip_n++)
7407 const ImU32 col = resize_grip_col[resize_grip_n];
7412 const float border_inner =
IM_ROUND(window_border_size * 0.5f);
7435 const bool has_close_button = (p_open != NULL);
7450 ImVec2 collapse_button_pos;
7451 if (has_close_button)
7468 if (has_collapse_button)
7473 if (has_close_button)
7498 float pad_extend =
ImMin(
ImMax(pad_l, pad_r), title_bar_rect.
GetWidth() - pad_l - pad_r - text_size.
x);
7499 pad_l =
ImMax(pad_l, pad_extend * centerness);
7500 pad_r =
ImMax(pad_r, pad_extend * centerness);
7503 ImRect layout_r(title_bar_rect.
Min.
x + pad_l, title_bar_rect.
Min.
y, title_bar_rect.
Max.
x - pad_r, title_bar_rect.
Max.
y);
7509 marker_pos.
y = (layout_r.
Min.
y + layout_r.
Max.
y) * 0.5f;
7510 if (marker_pos.
x > layout_r.
Min.
x)
7513 clip_r.
Max.
x =
ImMin(clip_r.
Max.
x, marker_pos.
x - (
int)(marker_size_x * 0.5f));
7590 IM_ASSERT(name != NULL && name[0] !=
'\0');
7596 const bool window_just_created = (window == NULL);
7597 if (window_just_created)
7609 const bool first_begin_of_the_frame = (window->
LastFrameActive != current_frame);
7613 bool window_just_activated_by_user = (window->
LastFrameActive < current_frame - 1);
7617 window_just_activated_by_user |= (window->
PopupId != popup_ref.
PopupId);
7618 window_just_activated_by_user |= (window != popup_ref.
Window);
7622 const bool window_was_appearing = window->
Appearing;
7623 if (first_begin_of_the_frame)
7626 window->
Appearing = window_just_activated_by_user;
7639 flags = window->
Flags;
7647 if (first_begin_of_the_frame)
7649 bool has_dock_node = (window->
DockId != 0 || window->
DockNode != NULL);
7653 if (has_dock_node || new_auto_dock_node)
7656 flags = window->
Flags;
7664 if (window->
DockTabIsVisible && !dock_tab_was_visible && dock_node_was_visible && !window->
Appearing && !window_was_appearing)
7689 window_stack_data.
Window = window;
7699 if (first_begin_of_the_frame)
7731 popup_ref.
Window = window;
7739 bool window_pos_set_by_api =
false;
7740 bool window_size_x_set_by_api =
false, window_size_y_set_by_api =
false;
7782 else if (first_begin_of_the_frame)
7804 if (first_begin_of_the_frame && !window->
SkipRefresh)
7811 window->
ClipRect =
ImVec4(-FLT_MAX, -FLT_MAX, +FLT_MAX, +FLT_MAX);
7827 bool window_title_visible_elsewhere =
false;
7829 window_title_visible_elsewhere =
true;
7831 window_title_visible_elsewhere =
true;
7833 window_title_visible_elsewhere =
true;
7834 if (window_title_visible_elsewhere && !window_just_created &&
strcmp(name, window->
Name) != 0)
7857 if (window_just_created && (!window_size_x_set_by_api || !window_size_y_set_by_api))
7867 if (!window_size_x_set_by_api)
7869 if (!window_size_y_set_by_api)
7881 flags = window->
Flags;
7903 bool use_current_size_for_scrollbar_x = window_just_created;
7904 bool use_current_size_for_scrollbar_y = window_just_created;
7906 use_current_size_for_scrollbar_x =
true;
7908 use_current_size_for_scrollbar_y =
true;
7924 use_current_size_for_scrollbar_y =
true;
7950 if (!window_size_x_set_by_api)
7953 use_current_size_for_scrollbar_x =
true;
7955 if (!window_size_y_set_by_api)
7958 use_current_size_for_scrollbar_y =
true;
7968 use_current_size_for_scrollbar_x =
true;
7973 use_current_size_for_scrollbar_y =
true;
7986 if (window_just_activated_by_user)
8004 if (window_pos_with_pivot)
8008 else if ((flags &
ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api && window_just_appearing_after_hidden_for_resize)
8035 ImRect visibility_rect(viewport_work_rect.
Min + visibility_padding, viewport_work_rect.
Max - visibility_padding);
8060 visibility_rect.
Expand(-visibility_padding);
8078 bool want_focus =
false;
8088#ifdef IMGUI_ENABLE_TEST_ENGINE
8106 int border_hovered = -1, border_held = -1;
8107 ImU32 resize_grip_col[4] = {};
8110 if (handle_borders_and_resize_grips && !window->
Collapsed)
8111 if (
int auto_fit_mask =
UpdateWindowManualResize(window, size_auto_fit, &border_hovered, &border_held, resize_grip_count, &resize_grip_col[0], visibility_rect))
8114 use_current_size_for_scrollbar_x =
true;
8116 use_current_size_for_scrollbar_y =
true;
8146 float size_x_for_scrollbars = use_current_size_for_scrollbar_x ? avail_size_from_current_frame.
x : avail_size_from_last_frame.
x;
8147 float size_y_for_scrollbars = use_current_size_for_scrollbar_y ? avail_size_from_current_frame.
y : avail_size_from_last_frame.
y;
8159 if (scrollbar_x_stabilize)
8246 if (is_undocked_or_docked_visible)
8248 bool render_decorations_in_parent =
false;
8254 bool previous_child_overlapping = previous_child ? previous_child->
Rect().
Overlaps(window->
Rect()) :
false;
8257 render_decorations_in_parent =
true;
8259 if (render_decorations_in_parent)
8265 RenderWindowDecorations(window, title_bar_rect, title_bar_is_highlight, handle_borders_and_resize_grips, resize_grip_count, resize_grip_col, resize_grip_draw_size);
8267 if (render_decorations_in_parent)
8361 if (want_focus && window == g.
NavWindow)
8412#ifndef IMGUI_DISABLE_DEBUG_TOOLS
8418#ifdef IMGUI_ENABLE_TEST_ENGINE
8448 if (first_begin_of_the_frame && !window->
SkipRefresh)
8485 if (style.
Alpha <= 0.0f)
8500 bool skip_items =
false;
8516 else if (first_begin_of_the_frame)
8524#ifndef IMGUI_DISABLE_DEBUG_TOOLS
8604 item_flags |= option;
8606 item_flags &= ~option;
8634 if (!was_disabled && disabled)
8639 if (was_disabled || disabled)
8710 while (last_window != window)
8712 last_window = window;
8714 if (popup_hierarchy)
8725 if (window_root == potential_parent)
8727 while (window != NULL)
8729 if (window == potential_parent)
8731 if (window == window_root)
8742 while (window != NULL)
8744 if (window == potential_parent)
8757 if (display_layer_delta != 0)
8758 return display_layer_delta > 0;
8763 if (candidate_window == potential_above)
8765 if (candidate_window == potential_below)
8782 if (ref_window == NULL)
8795 result =
IsWindowChildOf(ref_window, cur_window, popup_hierarchy, dock_hierarchy);
8797 result = (ref_window == cur_window);
8836 return window->
Size.
x;
8842 return window->
Size.
y;
8866 if (offset.
x == 0.0f && offset.
y == 0.0f)
8891 return window->
Size;
9122#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
9159 if (focus_scope_id == 0)
9396#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
9418 if (window != NULL && window->
SkipItems)
9423 float final_size = (restore_font_size_after_scaling > 0.0f) ? restore_font_size_after_scaling : 0.0f;
9424 if (final_size == 0.0f)
9437#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
9480 if (font_size_base == 0.0f)
9509#ifndef IMGUI_DISABLE_DEBUG_TOOLS
9521#ifndef IMGUI_DISABLE_DEBUG_TOOLS
9533#ifndef IMGUI_DISABLE_DEBUG_TOOLS
9597#ifndef IMGUI_DISABLE_DEBUG_TOOLS
9610#ifndef IMGUI_DISABLE_DEBUG_TOOLS
9621#ifndef IMGUI_DISABLE_DEBUG_TOOLS
9643 return window->
GetID(str_id);
9649 return window->
GetID(str_id_begin, str_id_end);
9655 return window->
GetID(ptr_id);
9661 return window->
GetID(int_id);
9761 IM_ASSERT(
IsNamedKey(key) &&
"Support for user key indices was dropped in favor of ImGuiKey. Please update backend & user code.");
9768 "Tab",
"LeftArrow",
"RightArrow",
"UpArrow",
"DownArrow",
"PageUp",
"PageDown",
9769 "Home",
"End",
"Insert",
"Delete",
"Backspace",
"Space",
"Enter",
"Escape",
9770 "LeftCtrl",
"LeftShift",
"LeftAlt",
"LeftSuper",
"RightCtrl",
"RightShift",
"RightAlt",
"RightSuper",
"Menu",
9771 "0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
9772 "I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
9773 "F1",
"F2",
"F3",
"F4",
"F5",
"F6",
"F7",
"F8",
"F9",
"F10",
"F11",
"F12",
9774 "F13",
"F14",
"F15",
"F16",
"F17",
"F18",
"F19",
"F20",
"F21",
"F22",
"F23",
"F24",
9775 "Apostrophe",
"Comma",
"Minus",
"Period",
"Slash",
"Semicolon",
"Equal",
"LeftBracket",
9776 "Backslash",
"RightBracket",
"GraveAccent",
"CapsLock",
"ScrollLock",
"NumLock",
"PrintScreen",
9777 "Pause",
"Keypad0",
"Keypad1",
"Keypad2",
"Keypad3",
"Keypad4",
"Keypad5",
"Keypad6",
9778 "Keypad7",
"Keypad8",
"Keypad9",
"KeypadDecimal",
"KeypadDivide",
"KeypadMultiply",
9779 "KeypadSubtract",
"KeypadAdd",
"KeypadEnter",
"KeypadEqual",
9780 "AppBack",
"AppForward",
"Oem102",
9781 "GamepadStart",
"GamepadBack",
9782 "GamepadFaceLeft",
"GamepadFaceRight",
"GamepadFaceUp",
"GamepadFaceDown",
9783 "GamepadDpadLeft",
"GamepadDpadRight",
"GamepadDpadUp",
"GamepadDpadDown",
9784 "GamepadL1",
"GamepadR1",
"GamepadL2",
"GamepadR2",
"GamepadL3",
"GamepadR3",
9785 "GamepadLStickLeft",
"GamepadLStickRight",
"GamepadLStickUp",
"GamepadLStickDown",
9786 "GamepadRStickLeft",
"GamepadRStickRight",
"GamepadRStickUp",
"GamepadRStickDown",
9787 "MouseLeft",
"MouseRight",
"MouseMiddle",
"MouseX1",
"MouseX2",
"MouseWheelX",
"MouseWheelY",
9788 "ModCtrl",
"ModShift",
"ModAlt",
"ModSuper",
9796 IM_ASSERT(
IsNamedKeyOrMod(key) &&
"Support for user key indices was dropped in favor of ImGuiKey. Please update backend and user code.");
9837 if (repeat_rate <= 0.0f)
9838 return (t0 < repeat_delay) && (t1 >= repeat_delay);
9839 const int count_t0 = (t0 < repeat_delay) ? -1 : (
int)((t0 - repeat_delay) / repeat_rate);
9840 const int count_t1 = (t1 < repeat_delay) ? -1 : (
int)((t1 - repeat_delay) / repeat_rate);
9841 const int count = count_t1 - count_t0;
9862 if (!key_data->
Down)
9890 routing_entry = &rt->
Entries[old_routing_idx];
9948 routing_data = &rt->
Entries[idx];
9949 if (routing_data->
Mods == mods)
9950 return routing_data;
9956 routing_data = &rt->
Entries[routing_data_idx];
9960 return routing_data;
9978 if (owner_id != 0 && g.
ActiveId == owner_id)
9988 if (focus_scope_id == 0)
9990 for (
int index_in_focus_path = 0; index_in_focus_path < g.
NavFocusRoute.
Size; index_in_focus_path++)
9992 return 3 + index_in_focus_path;
9997 if (owner_id != 0 && g.
ActiveId == owner_id)
10024 if (ignore_char_inputs)
10110 if (score < routing_data->RoutingNextScore)
10142 if (!key_data->
Down)
10158 if (!key_data->
Down)
10167 bool pressed = (t == 0.0f);
10170 float repeat_delay, repeat_rate;
10178 double key_pressed_time = g.
Time - t + 0.00001f;
10272 return !
IsMouseDown(button) && (time_since_release - g.
IO.
DeltaTime < delay) && (time_since_release >= delay);
10304 ImRect rect_clipped(r_min, r_max);
10322 if (lock_threshold < 0.0f)
10368 const float MOUSE_INVALID = -256000.0f;
10370 return p.
x >= MOUSE_INVALID && p.
y >= MOUSE_INVALID;
10390 if (lock_threshold < 0.0f)
10396 return ImVec2(0.0f, 0.0f);
10430 key_data->
Down = v;
10469 if (prev_key_mods != io.
KeyMods)
10471 if (prev_key_mods != io.
KeyMods && prev_key_mods == 0)
10503 if (!key_data->
Down)
10537 const bool mouse_stationary = (
ImLengthSqr(io.
MouseDelta) <= mouse_stationary_threshold * mouse_stationary_threshold);
10556 bool is_repeated_click =
false;
10561 is_repeated_click =
true;
10563 if (is_repeated_click)
10603 if (window == NULL)
10615 for (
int axis = 0; axis < 2; axis++)
10616 if (wheel[axis] != 0.0f)
10623 const bool has_scrolling = (window->ScrollMax[axis] != 0.0f);
10626 if (has_scrolling && !inputs_disabled)
10629 if (windows[0] == NULL && windows[1] == NULL)
10633 if (windows[0] == windows[1] || windows[0] == NULL || windows[1] == NULL)
10634 return windows[1] ? windows[1] : windows[0];
10670 if (!mouse_window || mouse_window->
Collapsed)
10697 wheel =
ImVec2(wheel.
y, 0.0f);
10707 if (wheel.
x == 0.0f && wheel.
y == 0.0f)
10716 bool do_scroll[2] = { wheel.
x != 0.0f && window->ScrollMax.x != 0.0f, wheel.
y != 0.0f && window->ScrollMax.y != 0.0f };
10722 float max_step = window->InnerRect.GetWidth() * 0.67f;
10723 float scroll_step =
ImTrunc(
ImMin(2 * window->FontRefSize, max_step));
10724 SetScrollX(window, window->Scroll.x - wheel.
x * scroll_step);
10730 float max_step = window->InnerRect.GetHeight() * 0.67f;
10731 float scroll_step =
ImTrunc(
ImMin(5 * window->FontRefSize, max_step));
10732 SetScrollY(window, window->Scroll.y - wheel.
y * scroll_step);
10750#ifndef IMGUI_DISABLE_DEBUG_TOOLS
10753 const char* input_source_names[] = {
"None",
"Mouse",
"Keyboard",
"Gamepad" };
10755 return input_source_names[source];
10759 const char* mouse_source_names[] = {
"Mouse",
"TouchScreen",
"Pen" };
10761 return mouse_source_names[source];
10788 const bool trickle_interleaved_nonchar_keys_and_text = (trickle_fast_inputs && g.
WantTextInputNextFrame == 1);
10790 bool mouse_moved =
false, mouse_wheeled =
false, key_changed =
false, key_changed_nonchar =
false, text_inputted =
false;
10791 int mouse_button_changed = 0x00;
10804 if (trickle_fast_inputs && (mouse_button_changed != 0 || mouse_wheeled || key_changed || text_inputted))
10808 mouse_moved =
true;
10815 if (trickle_fast_inputs && ((mouse_button_changed & (1 << button)) || mouse_wheeled))
10821 mouse_button_changed |= (1 << button);
10826 if (trickle_fast_inputs && (mouse_moved || mouse_button_changed != 0))
10831 mouse_wheeled =
true;
10845 const int key_data_index = (int)(key_data - g.
IO.
KeysData);
10846 if (trickle_fast_inputs && key_data->
Down != e->
Key.
Down && (key_changed_mask.
TestBit(key_data_index) || mouse_button_changed != 0))
10850 if (trickle_interleaved_nonchar_keys_and_text && (text_inputted && !key_is_potentially_for_char_input))
10855 key_changed =
true;
10856 key_changed_mask.
SetBit(key_data_index);
10857 if (trickle_interleaved_nonchar_keys_and_text && !key_is_potentially_for_char_input)
10858 key_changed_nonchar =
true;
10869 if (trickle_fast_inputs && (mouse_button_changed != 0 || mouse_moved || mouse_wheeled))
10871 if (trickle_interleaved_nonchar_keys_and_text && key_changed_nonchar)
10875 if (trickle_interleaved_nonchar_keys_and_text)
10876 text_inputted =
true;
10893 for (
int n = 0; n < event_n; n++)
10897#ifndef IMGUI_DISABLE_DEBUG_TOOLS
11148 bool error =
false;
11150 if (sz_io !=
sizeof(
ImGuiIO)) { error =
true;
IM_ASSERT(sz_io ==
sizeof(
ImGuiIO) &&
"Mismatched struct layout!"); }
11152 if (sz_vec2 !=
sizeof(
ImVec2)) { error =
true;
IM_ASSERT(sz_vec2 ==
sizeof(
ImVec2) &&
"Mismatched struct layout!"); }
11153 if (sz_vec4 !=
sizeof(
ImVec4)) { error =
true;
IM_ASSERT(sz_vec4 ==
sizeof(
ImVec4) &&
"Mismatched struct layout!"); }
11193 IM_ASSERT_USER_ERROR(0,
"Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries.\nPlease submit an item e.g. Dummy() afterwards in order to grow window/parent boundaries.");
11213#ifdef __EMSCRIPTEN__
11237#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
11245 g.
IO.
ConfigFlags &= ~ImGuiConfigFlags_NavEnableSetMousePos;
11250 g.
IO.
ConfigFlags &= ~ImGuiConfigFlags_NavNoCaptureKeyboard;
11260 g.
IO.
ConfigFlags &= ~ImGuiConfigFlags_DpiEnableScaleViewports;
11272 IM_ASSERT(0 &&
"Please set DockingEnable before the first call to NewFrame()! Otherwise you will lose your .ini settings!");
11274 IM_ASSERT(0 &&
"Please set ViewportsEnable before the first call to NewFrame()! Otherwise you will lose your .ini settings!");
11289 IM_ASSERT((g.
Viewports[0]->PlatformUserData != NULL || g.
Viewports[0]->PlatformHandle != NULL) &&
"Platform init didn't setup main viewport.");
11322 IM_ASSERT((key_mods == 0 || g.
IO.
KeyMods == key_mods) &&
"Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods");
11476#ifndef IMGUI_DISABLE_DEBUG_TOOLS
11495 Text(
"In window '%s': %s", window ? window->
Name :
"NULL", msg);
11500 Text(
"(and more errors)");
11518#ifndef IMGUI_DISABLE_DEBUG_TOOLS
11525 BulletText(
"Code should use PushID()/PopID() in loops, or append \"##xx\" to same-label identifiers!");
11526 BulletText(
"Empty label e.g. Button(\"\") == same ID as parent widget/node. Use Button(\"##xx\") instead!");
11528 BulletText(
"Set io.ConfigDebugHighlightIdConflicts=false to disable this warning in non-programmers builds.");
11532 Text(
"(Hold CTRL to: use ");
11537 Text(
" to break in item call-stack, or ");
11541 Text(
"(Hold CTRL to ");
11554 Text(
"(Hold CTRL to:");
11575 if (use_locked_pos)
11586 else if (!is_visible)
11666#ifdef IMGUI_ENABLE_TEST_ENGINE
11675 if (!is_rect_visible)
11681#ifndef IMGUI_DISABLE_DEBUG_TOOLS
11690 IM_ASSERT(
id != window->
ID &&
"Cannot have an empty ID at the root of a window. If you need an empty label, use ## and read the FAQ about how the ID Stack works!");
11694#ifdef IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS
11697 int* p_alive = g.DebugDrawIdConflictsAliveCount.GetIntRef(
id, -1);
11698 int* p_highlight = g.DebugDrawIdConflictsHighlightSet.GetIntRef(
id, -1);
11703 window->
DrawList->
AddRect(bb.
Min -
ImVec2(1, 1), bb.
Max +
ImVec2(1, 1),
IM_COL32(255, 0, 0, 255), 0.0f,
ImDrawFlags_None, 2.0f);
11716 if (is_rect_visible)
11807 if (offset_from_start_x != 0.0f)
11809 if (spacing_w < 0.0f)
11816 if (spacing_w < 0.0f)
11932 float prev_split = w_items;
11933 for (
int i = components - 1; i > 0; i--)
11935 float next_split =
IM_TRUNC(w_items * i / components);
11937 prev_split = next_split;
11970 w =
ImMax(1.0f, region_avail_x + w);
11983 if (size.
x < 0.0f || size.
y < 0.0f)
11986 if (size.
x == 0.0f)
11987 size.
x = default_w;
11988 else if (size.
x < 0.0f)
11989 size.
x =
ImMax(4.0f, avail.
x + size.
x);
11991 if (size.
y == 0.0f)
11992 size.
y = default_h;
11993 else if (size.
y < 0.0f)
11994 size.
y =
ImMax(4.0f, avail.
y + size.
y);
12031#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
12126 if (group_contains_curr_active_id)
12128 else if (group_contains_deactivated_id)
12134 if (group_contains_curr_hovered_id)
12143 if (group_contains_deactivated_id)
12160static float CalcScrollEdgeSnap(
float target,
float snap_min,
float snap_max,
float snap_threshold,
float center_ratio)
12162 if (target <= snap_min + snap_threshold)
12163 return ImLerp(snap_min, target, center_ratio);
12164 if (target >= snap_max - snap_threshold)
12165 return ImLerp(target, snap_max, center_ratio);
12173 for (
int axis = 0; axis < 2; axis++)
12181 float snap_min = 0.0f;
12182 float snap_max = window->
ScrollMax[axis] + window->
SizeFull[axis] - decoration_size[axis];
12185 scroll[axis] = scroll_target - center_ratio * (window->
SizeFull[axis] - decoration_size[axis]);
12227 const bool fully_visible_x = item_rect.
Min.
x >= scroll_rect.
Min.
x && item_rect.
Max.
x <= scroll_rect.
Max.
x;
12228 const bool fully_visible_y = item_rect.
Min.
y >= scroll_rect.
Min.
y && item_rect.
Max.
y <= scroll_rect.
Max.
y;
12234 if (item_rect.
Min.
x < scroll_rect.
Min.
x || !can_be_fully_visible_x)
12236 else if (item_rect.
Max.
x >= scroll_rect.
Max.
x)
12241 if (can_be_fully_visible_x)
12249 if (item_rect.
Min.
y < scroll_rect.
Min.
y || !can_be_fully_visible_y)
12251 else if (item_rect.
Max.
y >= scroll_rect.
Max.
y)
12256 if (can_be_fully_visible_y)
12276 return delta_scroll;
12341 IM_ASSERT(center_x_ratio >= 0.0f && center_x_ratio <= 1.0f);
12349 IM_ASSERT(center_y_ratio >= 0.0f && center_y_ratio <= 1.0f);
12414 if (is_dragdrop_tooltip)
12435 const char* window_name_template = is_dragdrop_tooltip ?
"##Tooltip_DragDrop_%02d" :
"##Tooltip_%02d";
12436 char window_name[32];
12447 Begin(window_name, NULL, flags | extra_window_flags);
12465 va_start(args, fmt);
12483 va_start(args, fmt);
12520 if (popup_data.
PopupId ==
id)
12537 IM_ASSERT(0 &&
"Cannot use IsPopupOpen() with a string id and ImGuiPopupFlags_AnyPopupLevel.");
12591 if (window == NULL)
12592 return popup_window;
12595 return popup_window;
12629 popup_ref.
Window = NULL;
12647 bool keep_existing =
false;
12650 keep_existing =
true;
12680 int popup_count_to_keep = 0;
12699 bool ref_window_is_descendent_of_popup =
false;
12705 ref_window_is_descendent_of_popup =
true;
12708 if (!ref_window_is_descendent_of_popup)
12723 int popup_count_to_keep;
12724 for (popup_count_to_keep = g.
OpenPopupStack.
Size; popup_count_to_keep > 0; popup_count_to_keep--)
12737 IMGUI_DEBUG_LOG_POPUP(
"[popup] ClosePopupToLevel(%d), restore_under=%d\n", remaining, restore_focus_to_window_under_popup);
12748 if (restore_focus_to_window_under_popup && prev_popup.
Window)
12752 if (focus_window && !focus_window->
WasActive)
12768 while (popup_idx > 0)
12772 bool close_parent =
false;
12775 close_parent =
true;
12787 window->DC.NavHideHighlightOneFrame =
true;
12855 if (p_open && *p_open)
12870 const bool is_open =
Begin(name, p_open, flags);
12871 if (!is_open || (p_open && !*p_open))
12953 str_id =
"window_context";
12967 str_id =
"void_context";
12993 const ImGuiDir dir = (n == -1) ? *last_dir : dir_prefered_order[n];
12994 if (n != -1 && dir == *last_dir)
13015 const ImGuiDir dir = (n == -1) ? *last_dir : dir_prefered_order[n];
13016 if (n != -1 && dir == *last_dir)
13046 return ref_pos +
ImVec2(2, 2);
13092 r_avoid =
ImRect(parent_window->
Pos.
x + horizontal_overlap, -FLT_MAX, parent_window->
Pos.
x + parent_window->
Size.
x - horizontal_overlap - parent_window->
ScrollbarSizes.
x, FLT_MAX);
13115 return tooltip_pos;
13121 r_avoid =
ImRect(ref_pos.
x - 16, ref_pos.
y - 8, ref_pos.
x + 16, ref_pos.
y + 8);
13123 r_avoid =
ImRect(ref_pos.
x - 16, ref_pos.
y - 8, ref_pos.
x + 24 * scale, ref_pos.
y + 24 * scale);
13129 return window->
Pos;
13179 if (ref_window == NULL)
13191 return IsWindowChildOf(ref_window, cur_window, popup_hierarchy, dock_hierarchy);
13193 return (ref_window == cur_window);
13211 const bool child_flag_changed = new_is_explicit_child != window->
IsExplicitChild;
13212 if ((just_created || child_flag_changed) && !new_is_explicit_child)
13218 else if (!just_created && child_flag_changed && new_is_explicit_child)
13240 for (
int n = cur_order; n < new_order; n++)
13255 if (current_front_window == window || current_front_window->
RootWindowDockTree == window)
13282 IM_ASSERT(window != NULL && behind_window != NULL);
13288 if (pos_wnd < pos_beh)
13290 size_t copy_bytes = (pos_beh - pos_wnd - 1) *
sizeof(
ImGuiWindow*);
13292 g.
Windows[pos_beh - 1] = window;
13296 size_t copy_bytes = (pos_wnd - pos_beh) *
sizeof(
ImGuiWindow*);
13320 IMGUI_DEBUG_LOG_FOCUS(
"[focus] FocusWindow(\"%s\", UnlessBelowModal): prevented by \"%s\".\n", window ? window->
Name :
"<NULL>", blocking_modal->Name);
13382 if (under_this_window != NULL)
13393 for (
int i = start_idx; i >= 0; i--)
13397 if (window == ignore_window || !window->
WasActive)
13399 if (filter_viewport != NULL && window->
Viewport != filter_viewport)
13519 if (cand_max < curr_min)
13520 return cand_max - curr_min;
13521 if (curr_max < cand_min)
13522 return cand_min - curr_max;
13551 float dby =
NavScoreItemDistInterval(
ImLerp(cand.
Min.
y, cand.
Max.
y, 0.2f),
ImLerp(cand.
Min.
y, cand.
Max.
y, 0.8f),
ImLerp(curr.
Min.
y, curr.
Max.
y, 0.2f),
ImLerp(curr.
Min.
y, curr.
Max.
y, 0.8f));
13552 if (dby != 0.0f && dbx != 0.0f)
13553 dbx = (dbx / 1000.0f) + ((dbx > 0.0f) ? +1.0f : -1.0f);
13563 float dax = 0.0f, day = 0.0f, dist_axial = 0.0f;
13564 if (dbx != 0.0f || dby != 0.0f)
13572 dist_axial = dist_box;
13575 else if (dcx != 0.0f || dcy != 0.0f)
13580 dist_axial = dist_center;
13590#if IMGUI_DEBUG_NAV_SCORING
13594 if (quadrant == move_dir)
13605 if (debug_hovering || debug_tty)
13608 "d-box (%7.3f,%7.3f) -> %7.3f\nd-center (%7.3f,%7.3f) -> %7.3f\nd-axial (%7.3f,%7.3f) -> %7.3f\nnav %c, quadrant %c",
13609 dbx, dby, dist_box, dcx, dcy, dist_center, dax, day, dist_axial,
"-WENS"[move_dir+1],
"-WENS"[quadrant+1]);
13610 if (debug_hovering)
13623 bool new_best =
false;
13624 if (quadrant == move_dir)
13627 if (dist_box < result->DistBox)
13633 if (dist_box == result->
DistBox)
13636 if (dist_center < result->DistCenter)
13657 if (result->
DistBox == FLT_MAX && dist_axial < result->DistAxial)
13672 result->
Window = window;
13719 if (candidate_for_nav_default_focus)
13744 const float VISIBLE_RATIO = 0.70f;
13808 else if (g.
NavId ==
id)
13830 if (can_stop && g.
NavId ==
id)
13930 if (parent && parent != nav_window)
13942 return tab->Window;
13954 if (prev_nav_window)
13991 bool init_for_nav =
false;
13993 init_for_nav =
true;
13994 IMGUI_DEBUG_LOG_NAV(
"[nav] NavInitRequest: from NavInitWindow(), init_for_nav=%d, window=\"%s\", layer=%d\n", init_for_nav, window->
Name, g.
NavLayer);
14044 if (activated_shortcut)
14064 float repeat_delay, repeat_rate;
14096 if (nav_gamepad_active)
14097 for (
ImGuiKey key : nav_gamepad_keys_to_change_source)
14102 if (nav_keyboard_active)
14103 for (
ImGuiKey key : nav_keyboard_keys_to_change_source)
14126 bool set_mouse_pos =
false;
14129 set_mouse_pos =
true;
14158 if (g.
ActiveId == 0 && activate_pressed)
14222 if (nav_gamepad_active)
14228 if (scroll_dir.
y != 0.0f)
14234 if (!nav_keyboard_active && !nav_gamepad_active)
14247#if IMGUI_DEBUG_NAV_RECTS
14298 if (preferred_pos_rel.
x == FLT_MAX)
14299 preferred_pos_rel.
x =
ImMin(r.
Min.
x + 1.0f, r.
Max.
x) - rel_to_abs_offset.
x;
14300 if (preferred_pos_rel.
y == FLT_MAX)
14301 preferred_pos_rel.
y = r.
GetCenter().
y - rel_to_abs_offset.
y;
14306 r.
Min.
x = r.
Max.
x = preferred_pos_rel.
x + rel_to_abs_offset.
x;
14308 r.
Min.
y = r.
Max.
y = preferred_pos_rel.
y + rel_to_abs_offset.
y;
14347 float scoring_rect_offset_y = 0.0f;
14350 if (scoring_rect_offset_y != 0.0f)
14357#if IMGUI_DEBUG_NAV_SCORING
14402 inner_rect_rel.
Min.
x = clamp_x ? (inner_rect_rel.
Min.
x + pad_x) : -FLT_MAX;
14403 inner_rect_rel.
Max.
x = clamp_x ? (inner_rect_rel.
Max.
x - pad_x) : +FLT_MAX;
14404 inner_rect_rel.
Min.
y = clamp_y ? (inner_rect_rel.
Min.
y + pad_y) : -FLT_MAX;
14405 inner_rect_rel.
Max.
y = clamp_y ? (inner_rect_rel.
Max.
y - pad_y) : +FLT_MAX;
14413 if (window != NULL)
14417 scoring_rect.
TranslateY(scoring_rect_offset_y);
14444 if (nav_keyboard_active)
14459#if IMGUI_DEBUG_NAV_SCORING
14474 if (result == NULL)
14638 if (page_up_held == page_down_held && home_pressed == end_pressed)
14651 else if (home_pressed)
14653 else if (end_pressed)
14660 float nav_scoring_rect_offset_y = 0.0f;
14663 nav_scoring_rect_offset_y = -page_offset_y;
14670 nav_scoring_rect_offset_y = +page_offset_y;
14675 else if (home_pressed)
14680 nav_rect_rel.
Min.
y = nav_rect_rel.
Max.
y = 0.0f;
14682 nav_rect_rel.
Min.
x = nav_rect_rel.
Max.
x = 0.0f;
14687 else if (end_pressed)
14691 nav_rect_rel.
Min.
x = nav_rect_rel.
Max.
x = 0.0f;
14696 return nav_scoring_rect_offset_y;
14721 bool do_forward =
false;
14801 if (!window_target)
14854 bool apply_toggle_layer =
false;
14857 bool allow_windowing = (modal_window == NULL);
14858 if (!allow_windowing)
14877 const bool start_windowing_with_keyboard = allow_windowing && !g.
NavWindowingTarget && (keyboard_next_window || keyboard_prev_window);
14878 bool just_started_windowing_from_null_focus =
false;
14879 if (start_windowing_with_gamepad || start_windowing_with_keyboard)
14889 just_started_windowing_from_null_focus =
true;
14892 if (keyboard_next_window || keyboard_prev_window)
14908 if (focus_change_dir != 0 && !just_started_windowing_from_null_focus)
14920 apply_toggle_layer =
true;
14936 if ((keyboard_next_window || keyboard_prev_window) && !just_started_windowing_from_null_focus)
14938 else if ((io.
KeyMods & shared_mods) != shared_mods)
14944 bool windowing_toggle_layer_start =
false;
14946 for (
ImGuiKey windowing_toggle_key : windowing_toggle_keys)
14949 windowing_toggle_layer_start =
true;
14973 apply_toggle_layer =
true;
14986 if (nav_move_dir.
x != 0.0f || nav_move_dir.
y != 0.0f)
14988 const float NAV_MOVE_SPEED = 800.0f;
14993 if (accum_floored.
x != 0.0f || accum_floored.
y != 0.0f)
15003 if (apply_focus_window)
15030 const bool preserve_layer_1_nav_id = (new_nav_window->
DockNodeAsHost != NULL);
15047 return "(Dock node)";
15075 const char* label = window->
Name;
15134 bool source_drag_active =
false;
15136 ImGuiID source_parent_id = 0;
15140 if (source_id != 0)
15195 source_id =
ImHashStr(
"#SourceExtern");
15196 source_drag_active =
true;
15203 if (!source_drag_active)
15269 IM_ASSERT((data != NULL && data_size > 0) || (data == NULL && data_size == 0));
15283 memcpy(payload.
Data, data, data_size);
15285 else if (data_size > 0)
15290 memcpy(payload.
Data, data, data_size);
15294 payload.
Data = NULL;
15296 payload.
DataSize = (int)data_size;
15375 if (type != NULL && !payload.
IsDataType(type))
15392 payload.
Preview = was_accepted_previously;
15416 bb_display.
ClipWith(item_clip_rect);
15417 bb_display.
Expand(3.5f);
15419 if (push_clip_rect)
15422 if (push_clip_rect)
15473 va_start(args, fmt);
15519 const char* text_remaining = text;
15524 const char* line_start = text_remaining;
15525 const char* line_end =
ImStreolRange(line_start, text_end);
15526 const bool is_last_line = (line_end == text_end);
15527 if (line_start != line_end || !is_last_line)
15529 const int line_length = (int)(line_end - line_start);
15531 LogText(
"%*s%.*s", indentation,
"", line_length, line_start);
15533 if (*line_end ==
'\n')
15541 text_remaining = line_end + 1;
15581#ifndef IMGUI_DISABLE_TTY_FUNCTIONS
15599 if (!filename || !filename[0])
15639#ifndef IMGUI_DISABLE_TTY_FUNCTIONS
15670#ifndef IMGUI_DISABLE_TTY_FUNCTIONS
15673 const bool log_to_tty =
false;
15676 const bool log_to_clipboard =
Button(
"Log To Clipboard");
SameLine();
15688 if (log_to_clipboard)
15773 if (handler.
TypeHash == type_hash)
15790 size_t file_data_size = 0;
15794 if (file_data_size > 0)
15814 char*
const buf_end = buf + ini_size;
15815 memcpy(buf, ini_data, ini_size);
15824 void* entry_data = NULL;
15827 char* line_end = NULL;
15828 for (
char* line = buf; line < buf_end; line = line_end + 1)
15831 while (*line ==
'\n' || *line ==
'\r')
15834 while (line_end < buf_end && *line_end !=
'\n' && *line_end !=
'\r')
15837 if (line[0] ==
';')
15839 if (line[0] ==
'[' && line_end > line && line_end[-1] ==
']')
15843 const char* name_end = line_end - 1;
15844 const char* type_start = line + 1;
15845 char* type_end = (
char*)(
void*)
ImStrchrRange(type_start, name_end,
']');
15846 const char* name_start = type_end ?
ImStrchrRange(type_end + 1, name_end,
'[') : NULL;
15847 if (!type_end || !name_start)
15852 entry_data = entry_handler ? entry_handler->
ReadOpenFn(&g, entry_handler, name_start) : NULL;
15854 else if (entry_handler != NULL && entry_data != NULL)
15857 entry_handler->
ReadLineFn(&g, entry_handler, entry_data, line);
15863 memcpy(buf, ini_data, ini_size);
15878 size_t ini_data_size = 0;
15883 ImFileWrite(ini_data,
sizeof(
char), ini_data_size, f);
15909 if (
const char* p = strstr(name,
"###"))
15912 const size_t name_len =
ImStrlen(name);
15919 memcpy(settings->
GetName(), name, name_len + 1);
15930 if (settings->ID ==
id && !settings->WantDelete)
15950 if (window != NULL)
15954 if (window->
DockId != 0)
15958 settings->WantDelete =
true;
15979 return (
void*)settings;
15988 if (sscanf(line,
"Pos=%i,%i", &x, &y) == 2) { settings->
Pos =
ImVec2ih((
short)x, (
short)y); }
15989 else if (sscanf(line,
"Size=%i,%i", &x, &y) == 2) { settings->
Size =
ImVec2ih((
short)x, (
short)y); }
15990 else if (sscanf(line,
"ViewportId=0x%08X", &u1) == 1) { settings->
ViewportId = u1; }
15991 else if (sscanf(line,
"ViewportPos=%i,%i", &x, &y) == 2){ settings->
ViewportPos =
ImVec2ih((
short)x, (
short)y); }
15992 else if (sscanf(line,
"Collapsed=%d", &i) == 1) { settings->
Collapsed = (i != 0); }
15993 else if (sscanf(line,
"IsChild=%d", &i) == 1) { settings->
IsChild = (i != 0); }
15994 else if (sscanf(line,
"DockId=0x%X,%d", &u1, &i) == 2) { settings->
DockId = u1; settings->
DockOrder = (short)i; }
15995 else if (sscanf(line,
"DockId=0x%X", &u1) == 1) { settings->
DockId = u1; settings->
DockOrder = -1; }
15996 else if (sscanf(line,
"ClassId=0x%X", &u1) == 1) { settings->
ClassId = u1; }
16004 if (settings->WantApply)
16008 settings->WantApply =
false;
16046 if (settings->WantDelete)
16048 const char* settings_name = settings->GetName();
16049 buf->appendf(
"[%s][%s]\n", handler->
TypeName, settings_name);
16050 if (settings->IsChild)
16052 buf->appendf(
"IsChild=1\n");
16053 buf->appendf(
"Size=%d,%d\n", settings->Size.x, settings->Size.y);
16059 buf->appendf(
"ViewportPos=%d,%d\n", settings->ViewportPos.x, settings->ViewportPos.y);
16060 buf->appendf(
"ViewportId=0x%08X\n", settings->ViewportId);
16063 buf->appendf(
"Pos=%d,%d\n", settings->Pos.x, settings->Pos.y);
16064 if (settings->Size.x != 0 || settings->Size.y != 0)
16065 buf->appendf(
"Size=%d,%d\n", settings->Size.x, settings->Size.y);
16066 buf->appendf(
"Collapsed=%d\n", settings->Collapsed);
16067 if (settings->DockId != 0)
16070 if (settings->DockOrder == -1)
16071 buf->appendf(
"DockId=0x%08X\n", settings->DockId);
16073 buf->appendf(
"DockId=0x%08X,%d\n", settings->DockId, settings->DockOrder);
16074 if (settings->ClassId != 0)
16075 buf->appendf(
"ClassId=0x%08X\n", settings->ClassId);
16089 for (
int n = 0; n < count; n++)
16132 if (viewport->
ID ==
id)
16149 (void)current_window;
16207 if (window_behind == window)
16218 if (g.
Windows[n]->Viewport == old_viewport)
16247 ImRect test_still_fit_rect(old_pos, old_pos + old_size);
16248 ImVec2 delta_pos = new_pos - old_pos;
16250 if (translate_all_windows || (window->
Viewport == viewport && (old_size == new_size || test_still_fit_rect.
Contains(window->
Rect()))))
16281 best_candidate = viewport;
16282 return best_candidate;
16295 if (viewports_enabled)
16307 viewport->
Flags &= ~ImGuiViewportFlags_IsMinimized;
16318 viewport->
Flags &= ~ImGuiViewportFlags_IsFocused;
16320 focused_viewport = viewport;
16329 const bool prev_focused_has_been_destroyed = (prev_focused_viewport == NULL) || (prev_focused_viewport->
PlatformWindowCreated ==
false);
16342 const bool apply_imgui_focus_on_focused_viewport = !
IsAnyMouseDown() && !prev_focused_has_been_destroyed;
16343 if (apply_imgui_focus_on_focused_viewport)
16347 if (focused_viewport->
Window != NULL)
16355 if (focused_viewport)
16369 main_viewport_pos = main_viewport->
Pos;
16370 main_viewport_size = main_viewport->
Size;
16392 if (viewports_enabled)
16419 IM_ASSERT(insets.
x >= 0.0f && insets.
y >= 0.0f && insets.
z >= 0.0f && insets.
w >= 0.0f);
16426 viewport->
Alpha = 1.0f;
16435 float new_dpi_scale;
16442 IM_ASSERT(new_dpi_scale > 0.0f && new_dpi_scale < 99.0f);
16445 float scale_factor = new_dpi_scale / viewport->
DpiScale;
16457 viewport->
DpiScale = new_dpi_scale;
16483 if (!viewports_enabled)
16506 if (viewport_hovered != NULL)
16524 const bool is_mouse_dragging_with_an_expected_destination = g.
DragDropActive;
16525 if (is_mouse_dragging_with_an_expected_destination && viewport_hovered == NULL)
16563 if (window != NULL)
16580 viewport->
Pos = pos;
16582 viewport->
Size = size;
16584 if (prev_pos != viewport->
Pos || prev_size != viewport->
Size)
16595 viewport->
Flags = flags;
16613 viewport->
Window = window;
16618 if (window != NULL)
16685 bool lock_viewport =
false;
16696 lock_viewport =
true;
16729 if (try_to_merge_into_host_viewport)
16739 if (!lock_viewport)
16792 bool viewport_rect_changed =
false;
16801 else if (memcmp(&window->
Viewport->
Pos, &window->
Pos,
sizeof(window->
Pos)) != 0)
16803 viewport_rect_changed =
true;
16814 viewport_rect_changed =
true;
16821 if (viewport_rect_changed)
16847 if (is_short_lived_floating_window && !is_modal)
16854 viewport_flags &= ~window->WindowClass.ViewportFlagsOverrideClear;
16893 bool destroy_platform_window =
false;
16896 if (destroy_platform_window)
16908 if (is_new_platform_window)
16934 const char* title_begin = window_for_title->Name;
16936 const ImGuiID title_hash =
ImHashStr(title_begin, title_end - title_begin);
16939 char title_end_backup_c = *title_end;
16942 *title_end = title_end_backup_c;
16956 if (is_new_platform_window)
17030 if (monitor_count <= 1)
17031 return monitor_count - 1;
17036 int best_monitor_n = 0;
17037 float best_monitor_surface = 0.001f;
17039 for (
int monitor_n = 0; monitor_n < g.
PlatformIO.
Monitors.
Size && best_monitor_surface < surface_threshold; monitor_n++)
17045 ImRect overlapping_rect = rect;
17047 float overlapping_surface = overlapping_rect.
GetWidth() * overlapping_rect.
GetHeight();
17048 if (overlapping_surface < best_monitor_surface)
17050 best_monitor_surface = overlapping_surface;
17051 best_monitor_n = monitor_n;
17053 return best_monitor_n;
17401 if (node->IsRootNode() && node->IsSplitNode())
17442 if (hovered_window->DockNodeAsHost)
17444 else if (hovered_window->RootWindow->DockNode)
17458 if (node->IsFloatingNode())
17469 if (node->LastFrameActive == g.
FrameCount && node->IsVisible && node->HostWindow && node->IsLeafNode() && !node->IsBgDrawnThisFrame)
17474 node->HostWindow->DrawList->AddRectFilled(bg_rect.
Min, bg_rect.
Max, node->LastBgColor, node->HostWindow->WindowRounding, bg_rounding_flags);
17524 const bool merge = (merge_sibling_into_parent_node && parent_node != NULL);
17583 if (window_settings->DockId)
17585 data->CountChildNodes++;
17591 if (
ImGuiID dock_id = settings->DockId)
17594 data->CountWindows++;
17596 data_root->CountChildWindows++;
17608 bool remove =
false;
17624 for (
int node_n = 0; node_n < node_settings_count; node_n++)
17627 if (settings->
ID == 0)
17645 char host_window_title[20];
17731 if (payload_window)
17732 IMGUI_DEBUG_LOG_DOCKING(
"[docking] DockContextProcessDock node 0x%08X target '%s' dock window '%s', split_dir %d\n", node ? node->
ID : 0, target_window ? target_window->
Name :
"NULL", payload_window->
Name, req->
DockSplitDir);
17737 ImGuiID next_selected_id = 0;
17739 if (payload_window)
17743 if (payload_node && payload_node->
IsLeafNode())
17745 if (payload_node == NULL)
17746 next_selected_id = payload_window->
TabId;
17753 if (node && target_window && node == target_window->
DockNodeAsHost)
17760 node->
Pos = target_window->
Pos;
17765 node->
TabBar->
Tabs[0].Flags &= ~ImGuiTabItemFlags_Unsorted;
17777 DockNodeTreeSplit(ctx, node, split_axis, split_inheritor_child_idx, split_ratio, payload_node);
17784 if (node != payload_node)
17794 if (payload_node != NULL)
17806 if (visible_node->
TabBar)
17822 last_focused_root_node->
CentralNode = last_focused_node;
17830 const ImGuiID payload_dock_id = payload_node->
ID;
17836 else if (payload_window)
17842 if (payload_dock_id != 0)
17854 tab_bar->NextSelectedTabId = next_selected_id;
17868 if (ref_viewport == NULL)
17878 return ImMin(size, max_size);
17884 IMGUI_DEBUG_LOG_DOCKING(
"[docking] DockContextProcessUndockWindow window '%s', clear_persistent_docking_ref = %d\n", window->
Name, clear_persistent_docking_ref);
17908 new_node->
Pos = node->
Pos;
17927 window->
Flags &= ~ImGuiWindowFlags_ChildWindow;
17941 if (target != NULL && target_node == NULL)
17947 split_outer =
true;
18025 if (tab_bar == NULL)
18075 if (add_to_tab_bar)
18077 if (node->
TabBar == NULL)
18102 IM_ASSERT(save_dock_id == 0 || save_dock_id == node->
ID);
18107 window->
DockId = save_dock_id;
18108 window->
Flags &= ~ImGuiWindowFlags_ChildWindow;
18124 bool erased =
false;
18126 if (node->
Windows[n] == window)
18142 const int tab_count_threshold_for_tab_bar = node->
IsCentralNode() ? 1 : 2;
18143 if (node->
Windows.
Size < tab_count_threshold_for_tab_bar)
18182 IM_ASSERT(src_node && dst_node && dst_node != src_node);
18184 if (src_tab_bar != NULL)
18188 bool move_tab_bar = (src_tab_bar != NULL) && (dst_node->
TabBar == NULL);
18192 src_node->
TabBar = NULL;
18204 if (!move_tab_bar && src_node->
TabBar)
18233 node->
Windows[0]->DockIsActive =
false;
18262 IM_ASSERT(node->
IsLeafNode() &&
"If you get this assert: please submit .ini file + repro of actions leading to this.");
18277 if (window->
ID ==
id)
18306 for (
int window_n = 0; window_n < node->
Windows.
Size; window_n++)
18312 bool remove =
false;
18417 node->
WindowClass = first_node_with_windows->Windows[0]->WindowClass;
18418 for (
int n = 1; n < first_node_with_windows->Windows.Size; n++)
18419 if (first_node_with_windows->Windows[n]->WindowClass.DockingAllowUnclassed ==
false)
18421 node->
WindowClass = first_node_with_windows->Windows[n]->WindowClass;
18464 bool want_to_hide_host_window =
false;
18469 want_to_hide_host_window =
true;
18471 want_to_hide_host_window =
true;
18473 if (want_to_hide_host_window)
18479 node->
Pos = single_window->
Pos;
18529 if (ref_window == NULL)
18530 ref_window = node->
Windows[0];
18554 bool beginned_into_host_window =
false;
18593 char window_label[20];
18602 Begin(window_label, NULL, window_flags);
18604 beginned_into_host_window =
true;
18609 node->
Pos = host_window->
Pos;
18638 while (p_window != NULL && p_window->DockNode != NULL)
18641 if (p_node == node)
18652 bool central_node_hole_register_hit_test_hole = central_node_hole;
18653 if (central_node_hole)
18656 central_node_hole_register_hit_test_hole =
false;
18657 if (central_node_hole_register_hit_test_hole)
18665 ImRect hole_rect(central_node->
Pos, central_node->
Pos + central_node->
Size);
18671 if (central_node_hole && !hole_rect.
IsInverted())
18704 if (render_dockspace_bg && node->
IsVisible)
18707 if (central_node_hole)
18754 if (beginned_into_host_window)
18785 for (
int tab_n = 0; tab_n < tab_bar->
Tabs.
Size; tab_n++)
18867 const bool closed_all = node->
WantCloseAll && node_was_active;
18873 bool is_focused =
false;
18897 bool backup_skip_item = host_window->
SkipItems;
18909 bool tab_bar_is_recreated = (tab_bar == NULL);
18910 if (tab_bar == NULL)
18924 if (has_window_menu_button &&
IsPopupOpen(
"#WindowMenu"))
18934 ImRect title_bar_rect, tab_bar_rect;
18935 ImVec2 window_menu_button_pos;
18936 ImVec2 close_button_pos;
18940 const int tabs_count_old = tab_bar->
Tabs.
Size;
18941 for (
int window_n = 0; window_n < node->
Windows.
Size; window_n++)
18956 if (has_window_menu_button)
18967 int tabs_unsorted_start = tab_bar->
Tabs.
Size;
18971 tab_bar->
Tabs[tab_n].Flags &= ~ImGuiTabItemFlags_Unsorted;
18972 tabs_unsorted_start = tab_n;
18974 if (tab_bar->
Tabs.
Size > tabs_unsorted_start)
18976 IMGUI_DEBUG_LOG_DOCKING(
"[docking] In node 0x%08X: %d new appearing tabs:%s\n", node->
ID, tab_bar->
Tabs.
Size - tabs_unsorted_start, (tab_bar->
Tabs.
Size > tabs_unsorted_start + 1) ?
" (will sort)" :
"");
18977 for (
int tab_n = tabs_unsorted_start; tab_n < tab_bar->
Tabs.
Size; tab_n++)
18984 if (tab_bar->
Tabs.
Size > tabs_unsorted_start + 1)
18995 else if (tab_bar->
Tabs.
Size > tabs_count_old)
19002 if (!host_window->
Collapsed && is_focused)
19004 tab_bar->
ID =
GetID(
"#TabBar");
19017 for (
int window_n = 0; window_n < node->
Windows.
Size; window_n++)
19036 bool tab_open =
true;
19067 if (close_button_is_visible)
19069 if (!close_button_is_enabled)
19077 for (
int n = 0; n < tab_bar->
Tabs.
Size; n++)
19082 if (!close_button_is_enabled)
19091 ImGuiID title_bar_id = host_window->
GetID(
"#TITLEBAR");
19124 if (focus_tab_id != 0)
19139 host_window->
SkipItems = backup_skip_item;
19151 if (node->
TabBar == NULL)
19195 for (
int payload_n = 0; payload_n < payload_count; payload_n++)
19212 if (out_title_rect) { *out_title_rect = r; }
19235 if (out_tab_bar_rect) { *out_tab_bar_rect = r; }
19236 if (out_window_menu_button_pos) { *out_window_menu_button_pos = window_menu_button_pos; }
19244 pos_new[axis ^ 1] = pos_old[axis ^ 1];
19245 size_new[axis ^ 1] = size_old[axis ^ 1];
19248 const float w_avail = size_old[axis] - dock_spacing;
19249 if (size_new_desired[axis] > 0.0f && size_new_desired[axis] <= w_avail * 0.5f)
19251 size_new[axis] = size_new_desired[axis];
19252 size_old[axis] =
IM_TRUNC(w_avail - size_new[axis]);
19256 size_new[axis] =
IM_TRUNC(w_avail * 0.5f);
19257 size_old[axis] =
IM_TRUNC(w_avail - size_new[axis]);
19263 pos_new[axis] = pos_old[axis] + size_old[axis] + dock_spacing;
19267 pos_new[axis] = pos_old[axis];
19268 pos_old[axis] = pos_new[axis] + size_new[axis] + dock_spacing;
19287 hs_w =
ImTrunc(hs_for_central_nodes * 1.50f);
19288 hs_h =
ImTrunc(hs_for_central_nodes * 0.80f);
19293 hs_w =
ImTrunc(hs_for_central_nodes);
19294 hs_h =
ImTrunc(hs_for_central_nodes * 0.90f);
19300 else if (dir ==
ImGuiDir_Up) { out_r =
ImRect(c.
x - hs_w, c.
y - off.
y - hs_h, c.
x + hs_w, c.
y - off.
y + hs_h); }
19305 if (test_mouse_pos == NULL)
19309 if (!outer_docking)
19313 ImVec2 mouse_delta = (*test_mouse_pos - c);
19314 float mouse_delta_len2 =
ImLengthSqr(mouse_delta);
19315 float r_threshold_center = hs_w * 1.4f;
19316 float r_threshold_sides = hs_w * (1.4f + 1.2f);
19317 if (mouse_delta_len2 < r_threshold_center * r_threshold_center)
19319 if (mouse_delta_len2 < r_threshold_sides * r_threshold_sides)
19322 return hit_r.
Contains(*test_mouse_pos);
19334 if (payload_node == NULL)
19337 if (ref_node_for_rect)
19344 if (is_outer_docking)
19423 int overlay_draw_lists_count = 0;
19426 if (host_window->
Viewport != root_payload->
Viewport && !is_transparent_payload)
19443 for (
int overlay_n = 0; overlay_n < overlay_draw_lists_count; overlay_n++)
19454 if (host_node && host_node->
TabBar)
19470 const int payload_count = tab_bar_with_payload ? tab_bar_with_payload->
Tabs.
Size : 1;
19471 for (
int payload_n = 0; payload_n < payload_count; payload_n++)
19474 ImGuiWindow* payload_window = tab_bar_with_payload ? tab_bar_with_payload->
Tabs[payload_n].Window : root_payload;
19475 if (tab_bar_with_payload && payload_window == NULL)
19482 ImRect tab_bb(tab_pos.
x, tab_pos.
y, tab_pos.
x + tab_size.
x, tab_pos.
y + tab_size.
y);
19487 for (
int overlay_n = 0; overlay_n < overlay_draw_lists_count; overlay_n++)
19490 if (!tab_bar_rect.
Contains(tab_bb))
19492 TabItemBackground(overlay_draw_lists[overlay_n], tab_bb, tab_flags, overlay_col_tabs);
19494 if (!tab_bar_rect.
Contains(tab_bb))
19508 ImRect draw_r_in = draw_r;
19509 draw_r_in.
Expand(-2.0f);
19511 for (
int overlay_n = 0; overlay_n < overlay_draw_lists_count; overlay_n++)
19514 overlay_draw_lists[overlay_n]->
AddRectFilled(draw_r.
Min, draw_r.
Max, overlay_col, overlay_rounding);
19515 overlay_draw_lists[overlay_n]->
AddRect(draw_r_in.
Min, draw_r_in.
Max, overlay_col_lines, overlay_rounding);
19552 ImGuiDockNode* child_inheritor = (split_inheritor_child_idx == 0) ? child_0 : child_1;
19565 child_0->
SizeRef[split_axis] =
ImTrunc(size_avail * split_ratio);
19577 parent_node->
LocalFlags &= ~ImGuiDockNodeFlags_LocalFlagsTransferMask_;
19592 IM_ASSERT(merge_lead_child == child_0 || merge_lead_child == child_1);
19598 IMGUI_DEBUG_LOG_DOCKING(
"[docking] DockNodeTreeMerge: 0x%08X + 0x%08X back into parent 0x%08X\n", child_0 ? child_0->
ID : 0, child_1 ? child_1->
ID : 0, parent_node->
ID);
19615 parent_node->
SizeRef = backup_last_explicit_size;
19618 parent_node->
LocalFlags &= ~ImGuiDockNodeFlags_LocalFlagsTransferMask_;
19643 const bool write_to_node = only_write_to_single_node == NULL || only_write_to_single_node == node;
19655 ImVec2 child_0_pos = pos, child_1_pos = pos;
19656 ImVec2 child_0_size = size, child_1_size = size;
19658 const bool child_0_is_toward_single_node = (only_write_to_single_node != NULL &&
DockNodeIsInHierarchyOf(only_write_to_single_node, child_0));
19659 const bool child_1_is_toward_single_node = (only_write_to_single_node != NULL &&
DockNodeIsInHierarchyOf(only_write_to_single_node, child_1));
19660 const bool child_0_is_or_will_be_visible = child_0->
IsVisible || child_0_is_toward_single_node;
19661 const bool child_1_is_or_will_be_visible = child_1->
IsVisible || child_1_is_toward_single_node;
19663 if (child_0_is_or_will_be_visible && child_1_is_or_will_be_visible)
19667 const float size_avail =
ImMax(size[axis] - spacing, 0.0f);
19680 child_0_size[axis] = child_0->
SizeRef[axis] =
ImMin(size_avail - 1.0f, child_0->
Size[axis]);
19681 child_1_size[axis] = child_1->
SizeRef[axis] = (size_avail - child_0_size[axis]);
19686 child_1_size[axis] = child_1->
SizeRef[axis] =
ImMin(size_avail - 1.0f, child_1->
Size[axis]);
19687 child_0_size[axis] = child_0->
SizeRef[axis] = (size_avail - child_1_size[axis]);
19694 float split_ratio = child_0_size[axis] / (child_0_size[axis] + child_1_size[axis]);
19695 child_0_size[axis] = child_0->
SizeRef[axis] =
ImTrunc(size_avail * split_ratio);
19696 child_1_size[axis] = child_1->
SizeRef[axis] = (size_avail - child_0_size[axis]);
19703 child_0_size[axis] =
ImMin(size_avail - size_min_each, child_0->
SizeRef[axis]);
19704 child_1_size[axis] = (size_avail - child_0_size[axis]);
19708 child_1_size[axis] =
ImMin(size_avail - size_min_each, child_1->
SizeRef[axis]);
19709 child_0_size[axis] = (size_avail - child_1_size[axis]);
19715 child_0_size[axis] =
ImMax(size_min_each,
ImTrunc(size_avail * split_ratio + 0.5f));
19716 child_1_size[axis] = (size_avail - child_0_size[axis]);
19719 child_1_pos[axis] += spacing + child_0_size[axis];
19722 if (only_write_to_single_node == NULL)
19725 const bool child_0_recurse = only_write_to_single_node ? child_0_is_toward_single_node : child_0->
IsVisible;
19726 const bool child_1_recurse = only_write_to_single_node ? child_1_is_toward_single_node : child_1->
IsVisible;
19727 if (child_0_recurse)
19729 if (child_1_recurse)
19766 bb.
Min[axis] += child_0->
Size[axis];
19767 bb.
Max[axis ^ 1] += child_1->
Size[axis ^ 1];
19786 float resize_limits[2];
19787 resize_limits[0] = node->
ChildNodes[0]->
Pos[axis] + min_size;
19795 for (
int touching_node_n = 0; touching_node_n < touching_nodes[0].
Size; touching_node_n++)
19796 resize_limits[0] =
ImMax(resize_limits[0], touching_nodes[0][touching_node_n]->Rect().Min[axis] + min_size);
19797 for (
int touching_node_n = 0; touching_node_n < touching_nodes[1].
Size; touching_node_n++)
19798 resize_limits[1] =
ImMin(resize_limits[1], touching_nodes[1][touching_node_n]->Rect().Max[axis] - min_size);
19816 float cur_size_0 = child_0->
Size[axis];
19817 float cur_size_1 = child_1->
Size[axis];
19818 float min_size_0 = resize_limits[0] - child_0->
Pos[axis];
19819 float min_size_1 = child_1->
Pos[axis] + child_1->
Size[axis] - resize_limits[1];
19823 if (touching_nodes[0].Size > 0 && touching_nodes[1].Size > 0)
19825 child_0->
Size[axis] = child_0->
SizeRef[axis] = cur_size_0;
19826 child_1->
Pos[axis] -= cur_size_1 - child_1->
Size[axis];
19827 child_1->
Size[axis] = child_1->
SizeRef[axis] = cur_size_1;
19831 for (
int side_n = 0; side_n < 2; side_n++)
19832 for (
int touching_node_n = 0; touching_node_n < touching_nodes[side_n].
Size; touching_node_n++)
19834 ImGuiDockNode* touching_node = touching_nodes[side_n][touching_node_n];
19882 const float dock_spacing = 0.0f;
19884 r.
Expand(dock_spacing * 0.5f);
19892 return hovered_node;
19894 return hovered_node;
19916 if (window->
DockId == dock_id)
19922 if (new_node->IsSplitNode())
19926 if (new_node->CentralNode)
19928 IM_ASSERT(new_node->CentralNode->IsCentralNode());
19929 dock_id = new_node->CentralNode->ID;
19933 dock_id = new_node->LastFocusedNodeId;
19937 if (window->
DockId == dock_id)
19942 window->
DockId = dock_id;
19984 IM_ASSERT(node->
IsDockSpace() ==
false &&
"Cannot call DockSpace() twice a frame with the same ID");
19986 return dockspace_id;
19994 return dockspace_id;
19999 if (size.
x <= 0.0f)
20000 size.
x =
ImMax(content_avail.
x + size.
x, 4.0f);
20001 if (size.
y <= 0.0f)
20002 size.
y =
ImMax(content_avail.
y + size.
y, 4.0f);
20022 Begin(title, NULL, window_flags);
20052 return dockspace_id;
20061 if (viewport == NULL)
20086 Begin(label, NULL, host_window_flags);
20090 if (dockspace_id == 0)
20091 dockspace_id =
GetID(
"DockSpace");
20092 DockSpace(dockspace_id,
ImVec2(0.0f, 0.0f), dockspace_flags, window_class);
20096 return dockspace_id;
20131 ImGuiID prev_node_id = window->DockId;
20133 if (window->DockId != prev_node_id)
20134 window->DockOrder = -1;
20140 if (settings == NULL)
20142 if (settings->
DockId != node_id)
20144 settings->
DockId = node_id;
20231 if (root_id && root_node == NULL)
20233 bool has_central_node =
false;
20243 bool want_removal = (root_id == 0) || (node->ID != root_id &&
DockNodeGetRootNode(node)->
ID == root_id);
20246 if (node->IsCentralNode())
20247 has_central_node =
true;
20269 if (
ImGuiID window_settings_dock_id = settings->DockId)
20270 for (
int n = 0; n < nodes_to_remove.
Size; n++)
20271 if (nodes_to_remove[n]->ID == window_settings_dock_id)
20273 settings->DockId = root_id;
20278 if (nodes_to_remove.
Size > 1)
20280 for (
int n = 0; n < nodes_to_remove.
Size; n++)
20288 else if (has_central_node)
20299 if (clear_settings_refs)
20303 bool want_removal = (root_id == 0) || (settings->DockId == root_id);
20304 if (!want_removal && settings->DockId != 0)
20307 want_removal =
true;
20309 settings->DockId = 0;
20323 if (!clear_settings_refs)
20358 *out_id_at_dir = id_at_dir;
20359 if (out_id_at_opposite_dir)
20360 *out_id_at_opposite_dir = id_at_opposite_dir;
20371 dst_node->
Pos = src_node->
Pos;
20396 IM_ASSERT(out_node_remap_pairs != NULL);
20403 out_node_remap_pairs->
clear();
20412 if (src_window == NULL)
20416 dst_window->Pos = src_window->
Pos;
20417 dst_window->Size = src_window->
Size;
20418 dst_window->SizeFull = src_window->
SizeFull;
20419 dst_window->Collapsed = src_window->
Collapsed;
20435 dst_settings->
Pos = window_pos_2ih;
20448 IM_ASSERT(in_window_remap_pairs != NULL);
20460 for (
int remap_window_n = 0; remap_window_n < in_window_remap_pairs->
Size; remap_window_n += 2)
20462 const char* src_window_name = (*in_window_remap_pairs)[remap_window_n];
20463 const char* dst_window_name = (*in_window_remap_pairs)[remap_window_n + 1];
20470 src_dock_id = src_window->DockId;
20472 src_dock_id = src_window_settings->DockId;
20474 for (
int dock_remap_n = 0; dock_remap_n < node_remap_pairs.
Size; dock_remap_n += 2)
20475 if (node_remap_pairs[dock_remap_n] == src_dock_id)
20477 dst_dock_id = node_remap_pairs[dock_remap_n + 1];
20482 if (dst_dock_id != 0)
20485 IMGUI_DEBUG_LOG_DOCKING(
"[docking] Remap live window '%s' 0x%08X -> '%s' 0x%08X\n", src_window_name, src_dock_id, dst_window_name, dst_dock_id);
20502 for (
int dock_remap_n = 0; dock_remap_n < node_remap_pairs.
Size; dock_remap_n += 2)
20503 if (
ImGuiID src_dock_id = node_remap_pairs[dock_remap_n])
20505 ImGuiID dst_dock_id = node_remap_pairs[dock_remap_n + 1];
20507 for (
int window_n = 0; window_n < node->
Windows.
Size; window_n++)
20515 dock_remaining_windows.
push_back(DockRemainingWindowTask(window, dst_dock_id));
20518 for (
const DockRemainingWindowTask& task : dock_remaining_windows)
20586 bool node_was_visible = node->
IsVisible;
20608 if (auto_dock_node)
20610 if (window->
DockId == 0)
20619 bool want_undock =
false;
20633 if (window->
DockId != 0 && node == NULL)
20711 window->
Flags &= ~ImGuiWindowFlags_NoTitleBar;
20784 bool dock_into_floating_window =
false;
20802 dock_into_floating_window =
true;
20811 if (do_preview && (node != NULL || dock_into_floating_window))
20822 split_data = &split_outer;
20826 if (split_data == &split_outer)
20857 IMGUI_DEBUG_LOG_DOCKING(
"[docking] DockSettingsRenameNodeReferences: from 0x%08X -> to 0x%08X\n", old_node_id, new_node_id);
20858 for (
int window_n = 0; window_n < g.
Windows.
Size; window_n++)
20862 window->
DockId = new_node_id;
20866 if (settings->DockId == old_node_id)
20867 settings->DockId = new_node_id;
20877 for (
int node_n = 0; node_n < node_ids_count; node_n++)
20878 if (settings->DockId == node_ids[node_n])
20880 settings->DockId = 0;
20881 settings->DockOrder = -1;
20882 if (++found < node_ids_count)
20919 if (
strcmp(name,
"Data") != 0)
20936 if (strncmp(line,
"DockNode", 8) == 0) { line =
ImStrSkipBlank(line + strlen(
"DockNode")); }
20939 if (sscanf(line,
"ID=0x%08X%n", &node.
ID, &r) == 1) { line += r; }
else return;
20940 if (sscanf(line,
" Parent=0x%08X%n", &node.
ParentNodeId, &r) == 1) { line += r;
if (node.
ParentNodeId == 0)
return; }
20944 if (sscanf(line,
" Pos=%i,%i%n", &x, &y, &r) == 2) { line += r; node.
Pos =
ImVec2ih((
short)x, (
short)y); }
else return;
20945 if (sscanf(line,
" Size=%i,%i%n", &x, &y, &r) == 2) { line += r; node.
Size =
ImVec2ih((
short)x, (
short)y); }
else return;
20949 if (sscanf(line,
" SizeRef=%i,%i%n", &x, &y, &r) == 2) { line += r; node.
SizeRef =
ImVec2ih((
short)x, (
short)y); }
20958 if (sscanf(line,
" Selected=0x%08X%n", &node.
SelectedTabId,&r) == 1) { line += r; }
20961 node.
Depth = parent_settings->Depth + 1;
20969 node_settings.
ID = node->
ID;
20974 node_settings.
Depth = (char)depth;
20999 if (node->IsRootNode())
21007 buf->appendf(
"[%s][Data]\n", handler->
TypeName);
21010 const int line_start_pos = buf->size(); (void)line_start_pos;
21013 buf->appendf(
" ID=0x%08X", node_settings->
ID);
21022 buf->appendf(
" Pos=%d,%d Size=%d,%d", node_settings->
Pos.
x, node_settings->
Pos.
y, node_settings->
Size.
x, node_settings->
Size.
y);
21027 buf->appendf(
" NoResize=1");
21029 buf->appendf(
" CentralNode=1");
21031 buf->appendf(
" NoTabBar=1");
21033 buf->appendf(
" HiddenTabBar=1");
21035 buf->appendf(
" NoWindowMenuButton=1");
21037 buf->appendf(
" NoCloseButton=1");
21039 buf->appendf(
" Selected=0x%08X", node_settings->
SelectedTabId);
21045 buf->appendf(
"%*s",
ImMax(2, (line_start_pos + 92) - buf->size()),
"");
21046 if (node->IsDockSpace() && node->HostWindow && node->HostWindow->ParentWindow)
21047 buf->appendf(
" ; in '%s'", node->HostWindow->ParentWindow->Name);
21049 int contains_window = 0;
21051 if (settings->DockId == node_settings->
ID)
21053 if (contains_window++ == 0)
21054 buf->appendf(
" ; contains ");
21055 buf->appendf(
"'%s' ", settings->GetName());
21059 buf->appendf(
"\n");
21061 buf->appendf(
"\n");
21073#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS)
21076#pragma comment(lib, "user32")
21077#pragma comment(lib, "kernel32")
21086 if (!::OpenClipboard(NULL))
21088 HANDLE wbuf_handle = ::GetClipboardData(CF_UNICODETEXT);
21089 if (wbuf_handle == NULL)
21091 ::CloseClipboard();
21094 if (
const WCHAR* wbuf_global = (
const WCHAR*)::GlobalLock(wbuf_handle))
21096 int buf_len = ::WideCharToMultiByte(CP_UTF8, 0, wbuf_global, -1, NULL, 0, NULL, NULL);
21100 ::GlobalUnlock(wbuf_handle);
21101 ::CloseClipboard();
21107 if (!::OpenClipboard(NULL))
21109 const int wbuf_length = ::MultiByteToWideChar(CP_UTF8, 0, text, -1, NULL, 0);
21110 HGLOBAL wbuf_handle = ::GlobalAlloc(GMEM_MOVEABLE, (SIZE_T)wbuf_length *
sizeof(WCHAR));
21111 if (wbuf_handle == NULL)
21113 ::CloseClipboard();
21116 WCHAR* wbuf_global = (WCHAR*)::GlobalLock(wbuf_handle);
21117 ::MultiByteToWideChar(CP_UTF8, 0, text, -1, wbuf_global, wbuf_length);
21118 ::GlobalUnlock(wbuf_handle);
21119 ::EmptyClipboard();
21120 if (::SetClipboardData(CF_UNICODETEXT, wbuf_handle) == NULL)
21121 ::GlobalFree(wbuf_handle);
21122 ::CloseClipboard();
21125#elif defined(__APPLE__) && TARGET_OS_OSX && defined(IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS)
21127#include <Carbon/Carbon.h>
21128static PasteboardRef main_clipboard = 0;
21134 if (!main_clipboard)
21135 PasteboardCreate(kPasteboardClipboard, &main_clipboard);
21136 PasteboardClear(main_clipboard);
21137 CFDataRef cf_data = CFDataCreate(kCFAllocatorDefault, (
const UInt8*)text,
ImStrlen(text));
21140 PasteboardPutItemFlavor(main_clipboard, (PasteboardItemID)1, CFSTR(
"public.utf8-plain-text"), cf_data, 0);
21141 CFRelease(cf_data);
21148 if (!main_clipboard)
21149 PasteboardCreate(kPasteboardClipboard, &main_clipboard);
21150 PasteboardSynchronize(main_clipboard);
21152 ItemCount item_count = 0;
21153 PasteboardGetItemCount(main_clipboard, &item_count);
21154 for (ItemCount i = 0; i < item_count; i++)
21156 PasteboardItemID item_id = 0;
21157 PasteboardGetItemIdentifier(main_clipboard, i + 1, &item_id);
21158 CFArrayRef flavor_type_array = 0;
21159 PasteboardCopyItemFlavors(main_clipboard, item_id, &flavor_type_array);
21160 for (CFIndex j = 0, nj = CFArrayGetCount(flavor_type_array); j < nj; j++)
21163 if (PasteboardCopyItemFlavorData(main_clipboard, item_id, CFSTR(
"public.utf8-plain-text"), &cf_data) == noErr)
21166 int length = (int)CFDataGetLength(cf_data);
21170 CFRelease(cf_data);
21191 const char* text_end = text +
ImStrlen(text);
21201#ifndef IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
21202#if defined(__APPLE__) && TARGET_OS_IPHONE
21203#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
21205#if defined(__3DS__)
21206#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
21208#if defined(_WIN32) && defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
21209#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
21213#ifndef IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
21215#include <shellapi.h>
21217#pragma comment(lib, "shell32")
21221 const int path_wsize = ::MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
21223 path_wbuf.
resize(path_wsize);
21224 ::MultiByteToWideChar(CP_UTF8, 0, path, -1, path_wbuf.
Data, path_wsize);
21225 return (INT_PTR)::ShellExecuteW(NULL,
L"open", path_wbuf.
Data, NULL, NULL, SW_SHOWDEFAULT) > 32;
21228#include <sys/wait.h>
21232#if defined(__APPLE__)
21233 const char* args[] {
"open",
"--", path, NULL };
21235 const char* args[] {
"xdg-open", path, NULL };
21237 pid_t pid = fork();
21242 execvp(args[0],
const_cast<char **
>(args));
21248 waitpid(pid, &status, 0);
21249 return WEXITSTATUS(status) == 0;
21260#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS)
21264#pragma comment(lib, "imm32")
21275 if (HIMC himc = ::ImmGetContext(hwnd))
21277 COMPOSITIONFORM composition_form = {};
21280 composition_form.dwStyle = CFS_FORCE_POSITION;
21281 ::ImmSetCompositionWindow(himc, &composition_form);
21282 CANDIDATEFORM candidate_form = {};
21283 candidate_form.dwStyle = CFS_CANDIDATEPOS;
21286 ::ImmSetCandidateWindow(himc, &candidate_form);
21287 ::ImmReleaseContext(hwnd, himc);
21322#ifndef IMGUI_DISABLE_DEBUG_TOOLS
21337 if (thumb_window->
Viewport != viewport)
21363 float SCALE = 1.0f / 8.0f;
21364 ImRect bb_full(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX);
21379 ImRect viewport_draw_bb(off + (viewport->
Pos) * SCALE, off + (viewport->
Pos + viewport->
Size) * SCALE);
21397 const float key_rounding = 3.0f * scale;
21398 const ImVec2 key_face_size =
ImVec2(25.0f, 25.0f) * scale;
21399 const ImVec2 key_face_pos =
ImVec2(5.0f, 3.0f) * scale;
21400 const float key_face_rounding = 2.0f * scale;
21401 const ImVec2 key_label_pos =
ImVec2(7.0f, 4.0f) * scale;
21402 const ImVec2 key_step =
ImVec2(key_size.
x - 1.0f, key_size.
y - 1.0f);
21403 const float key_row_offset = 9.0f * scale;
21406 ImVec2 board_max =
ImVec2(board_min.
x + 3 * key_step.
x + 2 * key_row_offset + 10.0f, board_min.
y + 3 * key_step.
y + 10.0f);
21407 ImVec2 start_pos =
ImVec2(board_min.
x + 5.0f - key_step.
x, board_min.
y);
21409 struct KeyLayoutData {
int Row, Col;
const char* Label;
ImGuiKey Key; };
21410 const KeyLayoutData keys_to_display[] =
21412 { 0, 0,
"",
ImGuiKey_Tab }, { 0, 1,
"Q",
ImGuiKey_Q }, { 0, 2,
"W",
ImGuiKey_W }, { 0, 3,
"E",
ImGuiKey_E }, { 0, 4,
"R",
ImGuiKey_R },
21413 { 1, 0,
"",
ImGuiKey_CapsLock }, { 1, 1,
"A",
ImGuiKey_A }, { 1, 2,
"S",
ImGuiKey_S }, { 1, 3,
"D",
ImGuiKey_D }, { 1, 4,
"F",
ImGuiKey_F },
21414 { 2, 0,
"",
ImGuiKey_LeftShift },{ 2, 1,
"Z",
ImGuiKey_Z }, { 2, 2,
"X",
ImGuiKey_X }, { 2, 3,
"C",
ImGuiKey_C }, { 2, 4,
"V",
ImGuiKey_V }
21419 Dummy(board_max - board_min);
21423 for (
int n = 0; n <
IM_ARRAYSIZE(keys_to_display); n++)
21425 const KeyLayoutData* key_data = &keys_to_display[n];
21426 ImVec2 key_min =
ImVec2(start_pos.
x + key_data->Col * key_step.
x + key_data->Row * key_row_offset, start_pos.
y + key_data->Row * key_step.
y);
21427 ImVec2 key_max = key_min + key_size;
21429 draw_list->
AddRect(key_min, key_max,
IM_COL32(24, 24, 24, 255), key_rounding);
21430 ImVec2 face_min =
ImVec2(key_min.
x + key_face_pos.
x, key_min.
y + key_face_pos.
y);
21431 ImVec2 face_max =
ImVec2(face_min.
x + key_face_size.
x, face_min.
y + key_face_size.
y);
21434 ImVec2 label_min =
ImVec2(key_min.
x + key_label_pos.
x, key_min.
y + key_label_pos.
y);
21435 draw_list->
AddText(label_min,
IM_COL32(64, 64, 64, 255), key_data->Label);
21445 Text(
"Text: \"%s\"", str);
21453 for (
const char* p = str; *p != 0; )
21458 Text(
"%d", (
int)(p - str));
21460 for (
int byte_index = 0; byte_index < c_utf8_len; byte_index++)
21462 if (byte_index > 0)
21464 Text(
"0x%02X", (
int)(
unsigned char)p[byte_index]);
21474 Text(
"U+%04X", (
int)c);
21511 union {
void* ptr;
int integer; } tex_id_opaque;
21512 memcpy(&tex_id_opaque, &tex_id,
ImMin(
sizeof(
void*),
sizeof(tex_id)));
21513 if (
sizeof(tex_id) >=
sizeof(
void*))
21522 char* buf_end = buf + buf_size;
21541#ifdef IMGUI_ENABLE_FREETYPE
21542namespace ImGuiFreeType {
IMGUI_API const ImFontLoader* GetFontLoader();
IMGUI_API bool DebugEditFontLoaderFlags(
unsigned int* p_font_builder_flags); }
21568 BulletText(
"Warning: Font scaling will NOT be smooth, because\nImGuiBackendFlags_RendererHasTextures is not set!");
21571 TextLinkOpenURL(
"docs/BACKENDS.md",
"https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md");
21573 BulletText(
"Load a nice font for better results!");
21590#ifdef IMGUI_ENABLE_STB_TRUETYPE
21592 if (
RadioButton(
"stb_truetype", loader_current == loader_stbtruetype))
21601#ifdef IMGUI_ENABLE_FREETYPE
21602 const ImFontLoader* loader_freetype = ImGuiFreeType::GetFontLoader();
21603 if (
RadioButton(
"FreeType", loader_current == loader_freetype))
21605 if (loader_current == loader_freetype)
21608 Text(
"Shared FreeType Loader Flags: 0x%08X", loader_flags);
21609 if (ImGuiFreeType::DebugEditFontLoaderFlags(&loader_flags))
21621 SetItemTooltip(
"Requires #define IMGUI_ENABLE_FREETYPE + imgui_freetype.cpp.");
21643 if (
Button(
"Clear All"))
21647 for (
int tex_n = 0; tex_n < atlas->
TexList.
Size; tex_n++)
21672 ImFormatStringToTempBuffer(&buf, NULL,
"ID:%08X, used:%d, { w:%3d, h:%3d } { x:%4d, y:%4d }",
id, entry.
IsUsed, r.
w, r.
h, r.
x, r.
y);
21676 highlight_r_id = id;
21691 for (
int tex_n = 0; tex_n < atlas->
TexList.
Size; tex_n++)
21712 ImageWithBg(tex->
GetTexRef(),
ImVec2((
float)tex->
Width, (
float)tex->
Height),
ImVec2(0.0f, 0.0f),
ImVec2(1.0f, 1.0f),
ImVec4(0.0f, 0.0f, 0.0f, 1.0f));
21715 if (highlight_rect != NULL)
21718 ImRect r_inner(p.
x + highlight_rect->
x, p.
y + highlight_rect->
y, p.
x + highlight_rect->
x + highlight_rect->
w, p.
y + highlight_rect->
y + highlight_rect->
h);
21724 char texid_desc[30];
21766 enum { WRT_OuterRect, WRT_OuterRectClipped, WRT_InnerRect, WRT_InnerClipRect, WRT_WorkRect, WRT_Content, WRT_ContentIdeal, WRT_ContentRegionRect, WRT_Count };
21767 const char* wrt_rects_names[WRT_Count] = {
"OuterRect",
"OuterRectClipped",
"InnerRect",
"InnerClipRect",
"WorkRect",
"Content",
"ContentIdeal",
"ContentRegionRect" };
21768 enum { TRT_OuterRect, TRT_InnerRect, TRT_WorkRect, TRT_HostClipRect, TRT_InnerClipRect, TRT_BackgroundClipRect, TRT_ColumnsRect, TRT_ColumnsWorkRect, TRT_ColumnsClipRect, TRT_ColumnsContentHeadersUsed, TRT_ColumnsContentHeadersIdeal, TRT_ColumnsContentFrozen, TRT_ColumnsContentUnfrozen, TRT_Count };
21769 const char* trt_rects_names[TRT_Count] = {
"OuterRect",
"InnerRect",
"WorkRect",
"HostClipRect",
"InnerClipRect",
"BackgroundClipRect",
"ColumnsRect",
"ColumnsWorkRect",
"ColumnsClipRect",
"ColumnsContentHeadersUsed",
"ColumnsContentHeadersIdeal",
"ColumnsContentFrozen",
"ColumnsContentUnfrozen" };
21780 if (rect_type == TRT_OuterRect) {
return table->
OuterRect; }
21781 else if (rect_type == TRT_InnerRect) {
return table->
InnerRect; }
21782 else if (rect_type == TRT_WorkRect) {
return table->
WorkRect; }
21783 else if (rect_type == TRT_HostClipRect) {
return table->
HostClipRect; }
21784 else if (rect_type == TRT_InnerClipRect) {
return table->
InnerClipRect; }
21785 else if (rect_type == TRT_BackgroundClipRect) {
return table->
BgClipRect; }
21799 if (rect_type == WRT_OuterRect) {
return window->
Rect(); }
21800 else if (rect_type == WRT_OuterRectClipped) {
return window->
OuterRectClipped; }
21801 else if (rect_type == WRT_InnerRect) {
return window->
InnerRect; }
21802 else if (rect_type == WRT_InnerClipRect) {
return window->
InnerClipRect; }
21803 else if (rect_type == WRT_WorkRect) {
return window->
WorkRect; }
21806 else if (rect_type == WRT_ContentRegionRect) {
return window->
ContentRegionRect; }
21812#ifdef IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS
21813 TextColored(
ImVec4(1.0f, 0.0f, 0.0f, 1.0f),
"IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS is enabled.\nMust disable after use! Otherwise Dear ImGui will run slower.\n");
21823 MetricsHelpMarker(
"Will call the IM_DEBUG_BREAK() macro to break in debugger.\nWarning: If you don't have a debugger attached, this will probably crash.");
21832 MetricsHelpMarker(
"You can also call ImGui::ShowDebugLogWindow() from your code.");
21836 MetricsHelpMarker(
"You can also call ImGui::ShowIDStackToolWindow() from your code.");
21847 for (
int rect_n = 0; rect_n < WRT_Count; rect_n++)
21850 Text(
"(%6.1f,%6.1f) (%6.1f,%6.1f) Size (%6.1f,%6.1f) %s", r.
Min.
x, r.
Min.
y, r.
Max.
x, r.
Max.
y, r.
GetWidth(), r.
GetHeight(), wrt_rects_names[rect_n]);
21869 GetForegroundDrawList()->
AddRect(table->
OuterRect.
Min -
ImVec2(1, 1), table->
OuterRect.
Max +
ImVec2(1, 1),
IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
21872 for (
int rect_n = 0; rect_n < TRT_Count; rect_n++)
21874 if (rect_n >= TRT_ColumnsRect)
21876 if (rect_n != TRT_ColumnsRect && rect_n != TRT_ColumnsClipRect)
21878 for (
int column_n = 0; column_n < table->
ColumnsCount; column_n++)
21880 ImRect r = Funcs::GetTableRect(table, rect_n, column_n);
21881 ImFormatString(buf,
IM_ARRAYSIZE(buf),
"(%6.1f,%6.1f) (%6.1f,%6.1f) Size (%6.1f,%6.1f) Col %d %s", r.
Min.
x, r.
Min.
y, r.
Max.
x, r.
Max.
y, r.
GetWidth(), r.
GetHeight(), column_n, trt_rects_names[rect_n]);
21884 GetForegroundDrawList()->
AddRect(r.
Min -
ImVec2(1, 1), r.
Max +
ImVec2(1, 1),
IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
21889 ImRect r = Funcs::GetTableRect(table, rect_n, -1);
21890 ImFormatString(buf,
IM_ARRAYSIZE(buf),
"(%6.1f,%6.1f) (%6.1f,%6.1f) Size (%6.1f,%6.1f) %s", r.
Min.
x, r.
Min.
y, r.
Max.
x, r.
Max.
y, r.
GetWidth(), r.
GetHeight(), trt_rects_names[rect_n]);
21893 GetForegroundDrawList()->
AddRect(r.
Min -
ImVec2(1, 1), r.
Max +
ImVec2(1, 1),
IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
21905 MetricsHelpMarker(
"Some calls to Begin()/BeginChild() will return false.\n\nWill cycle through window depths then repeat. Windows should be flickering while running.");
21909 MetricsHelpMarker(
"You can also call ImGui::DebugTextEncoding() from your code with a given string to test that your UTF-8 encoding settings are correct.");
21912 static char buf[64] =
"";
21928 if (
TreeNode(
"By submission order (begin stack)"))
21936 struct Func {
static int IMGUI_CDECL WindowComparerByBeginOrder(
const void* lhs,
const void* rhs) {
return ((
int)(*(
const ImGuiWindow*
const *)lhs)->BeginOrderWithinContext - (*(
const ImGuiWindow*
const*)rhs)->BeginOrderWithinContext); } };
21946 int drawlist_count = 0;
21949 if (
TreeNode(
"DrawLists",
"DrawLists (%d)", drawlist_count))
21955 bool viewport_has_drawlist =
false;
21958 if (!viewport_has_drawlist)
21959 Text(
"Active DrawLists in Viewport #%d, ID: 0x%08X", viewport->
Idx, viewport->
ID);
21960 viewport_has_drawlist =
true;
21973 MetricsHelpMarker(
"Dear ImGui uses monitor data:\n- to query DPI settings on a per monitor basis\n- to position popup/tooltips so they don't straddle monitors.");
21995 if (
TreeNode(
"Inferred Z order (front-to-back)"))
22000 if (viewports.
Size > 1)
22004 BulletText(
"Viewport #%d, ID: 0x%08X, LastFocused = %08d, PlatformFocused = %s, Window: \"%s\"",
22034 BulletText(
"PopupID: %08x, Window: '%s' (%s%s), RestoreNavWindow '%s', ParentWindow '%s'",
22089#ifdef IMGUI_HAS_DOCK
22092 static bool root_nodes_only =
true;
22094 Checkbox(
"List root nodes", &root_nodes_only);
22101 if (!root_nodes_only || node->IsRootNode())
22145#ifdef IMGUI_HAS_DOCK
22146 if (
TreeNode(
"SettingsDocking",
"Settings packed data: Docking"))
22149 Text(
"In SettingsWindows:");
22151 if (settings->DockId != 0)
22152 BulletText(
"Window '%s' -> DockId %08X DockOrder=%d", settings->GetName(), settings->DockId, settings->DockOrder);
22153 Text(
"In SettingsNodes:");
22157 const char* selected_tab_name = NULL;
22161 selected_tab_name = window->Name;
22163 selected_tab_name = window_settings->GetName();
22180 if (
TreeNode(
"Memory allocations"))
22185 Text(
"Recent frames with allocations:");
22187 for (
int n = buf_size - 1; n >= 0; n--)
22202 Text(
"KEYBOARD/GAMEPAD/MOUSE KEYS");
22215 Text(
"MOUSE STATE");
22221 Text(
"Mouse pos: <INVALID>");
22234 Text(
"MOUSE WHEELING");
22243 Text(
"KEY OWNERS");
22259 Text(
"SHORTCUT ROUTING");
22261 MetricsHelpMarker(
"Declared shortcut routes automatically set key owner when mods matches.");
22277 if (
DebugBreakButton(
"**DebugBreak**",
"in SetShortcutRouting() for this KeyChord"))
22326 Text(
"NavFocusRoute[] = ");
22331 Text(
"0x%08X/", focus_scope.
ID);
22375 for (
int column_n = 0; column_n < table->
ColumnsCount; column_n++)
22391#ifdef IMGUI_HAS_DOCK
22407 overlay_draw_list->
AddText(NULL, 0.0f, pos,
IM_COL32(255, 255, 255, 255), buf);
22427 Text(
"To call IM_DEBUG_BREAK() %s:", description_of_location);
22429 TextUnformatted(keyboard_only ?
"- Press 'Pause/Break' on keyboard." :
"- Press 'Pause/Break' on keyboard.\n- or Click (may alter focus/active id).\n- or navigate using keyboard and press space.");
22431 TextUnformatted(
"Choose one way that doesn't interfere with what you are trying to debug!\nYou need a debugger attached or this will crash!");
22449 const ImRect bb(pos, pos + size);
22475 if (!
TreeNode((
void*)(uintptr_t)columns->
ID,
"Columns Id: 0x%08X, Count: %d, Flags: 0x%04X", columns->
ID, columns->
Count, columns->
Flags))
22485 using namespace ImGui;
22488 Text(
"%s:", label);
22533 BulletText(
"Pos (%.0f,%.0f), Size (%.0f, %.0f) Ref (%.0f, %.0f)",
22541 is_alive ?
" IsAlive" :
"", is_active ?
" IsActive" :
"", node->
IsFocused ?
" IsFocused" :
"",
22596 TextDisabled(
"Warning: owning Window is inactive. This DrawList is not being rendered!");
22598 for (
const ImDrawCmd* pcmd = draw_list->
CmdBuffer.
Data; pcmd < draw_list->CmdBuffer.Data + cmd_count; pcmd++)
22600 if (pcmd->UserCallback)
22602 BulletText(
"Callback %p, user_data %p", pcmd->UserCallback, pcmd->UserCallbackData);
22606 char texid_desc[30];
22610 pcmd->ElemCount / 3, texid_desc, pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w);
22614 if (!pcmd_node_open)
22621 float total_area = 0.0f;
22622 for (
unsigned int idx_n = pcmd->IdxOffset; idx_n < pcmd->IdxOffset + pcmd->ElemCount; )
22625 for (
int n = 0; n < 3; n++, idx_n++)
22626 triangle[n] = vtx_buffer[idx_buffer ? idx_buffer[idx_n] : idx_n].pos;
22627 total_area +=
ImTriangleArea(triangle[0], triangle[1], triangle[2]);
22631 ImFormatString(buf,
IM_ARRAYSIZE(buf),
"Mesh: ElemCount: %d, VtxOffset: +%d, IdxOffset: +%d, Area: ~%0.f px", pcmd->ElemCount, pcmd->VtxOffset, pcmd->IdxOffset, total_area);
22638 clipper.
Begin(pcmd->ElemCount / 3);
22639 while (clipper.
Step())
22642 char* buf_p = buf, * buf_end = buf +
IM_ARRAYSIZE(buf);
22644 for (
int n = 0; n < 3; n++, idx_i++)
22646 const ImDrawVert& v = vtx_buffer[idx_buffer ? idx_buffer[idx_i] : idx_i];
22647 triangle[n] = v.
pos;
22648 buf_p +=
ImFormatString(buf_p, buf_end - buf_p,
"%s %04d: pos (%8.2f,%8.2f), uv (%.6f,%.6f), col %08X\n",
22656 fg_draw_list->
Flags &= ~ImDrawListFlags_AntiAliasedLines;
22658 fg_draw_list->
Flags = backup_flags;
22673 ImRect vtxs_rect(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX);
22675 out_draw_list->
Flags &= ~ImDrawListFlags_AntiAliasedLines;
22682 for (
int n = 0; n < 3; n++, idx_n++)
22683 vtxs_rect.
Add((triangle[n] = vtx_buffer[idx_buffer ? idx_buffer[idx_n] : idx_n].pos));
22693 out_draw_list->
Flags = backup_flags;
22699 int mask = 0, count = 0;
22700 for (
int src_n = 0; src_n < font->
Sources.
Size; src_n++)
22705 mask |= (1 << src_n);
22708 return count > 1 ? mask : 0;
22726 Text(
"The quick brown fox jumps over the lazy dog");
22750#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
22752 DragFloat(
"Font scale", &font->
Scale, 0.005f, 0.3f, 2.0f,
"%.1f");
22765 for (
int src_n = 0; src_n < font->
Sources.
Size; src_n++)
22768 if (
TreeNode(src,
"Input %d: \'%s\', Oversample: %d,%d, PixelSnapH: %d, Offset: (%.1f,%.1f)",
22772 Text(
"Loader: '%s'", loader->
Name ? loader->
Name :
"N/A");
22773#ifdef IMGUI_ENABLE_FREETYPE
22774 if (loader->
Name != NULL &&
strcmp(loader->
Name,
"FreeType") == 0)
22777 Text(
"FreeType Loader Flags: 0x%08X", loader_flags);
22778 if (ImGuiFreeType::DebugEditFontLoaderFlags(&loader_flags))
22791 TextWrapped(
"- First Input that contains the glyph is used.\n"
22792 "- Use ImFontConfig::GlyphExcludeRanges[] to specify ranges to ignore glyph in given Input.\n- Prefer using a small number of ranges as the list is scanned every time a new glyph is loaded,\n - e.g. GlyphExcludeRanges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };\n- This tool doesn't cache results and is slow, don't keep it open!");
22795 for (
unsigned int c = 0; c < 0x10000; c++)
22798 unsigned int c_end = c + 1;
22804 for (
unsigned int n = c; n < c_end; n++)
22809 for (
int src_n = 0; src_n < font->
Sources.
Size; src_n++)
22810 if (overlap_mask & (1 << src_n))
22812 Text(
"%d ", src_n);
22838 for (
int src_n = 0; src_n < font->
Sources.
Size; src_n++)
22841 int oversample_h, oversample_v;
22843 BulletText(
"Input %d: \'%s\', Oversample: (%d=>%d,%d=>%d), PixelSnapH: %d, Offset: (%.1f,%.1f)",
22860 const float cell_size = baked->
Size * 1;
22869 base += 8192 - 256;
22874 for (
unsigned int n = 0; n < 256; n++)
22876 if (src_mask & (1 << glyph->SourceIdx))
22880 if (!
TreeNode((
void*)(intptr_t)base,
"U+%04X..U+%04X (%d %s)", base, base + 255, count, count > 1 ?
"glyphs" :
"glyph"))
22885 for (
unsigned int n = 0; n < 256; n++)
22889 ImVec2 cell_p1(base_pos.
x + (n % 16) * (cell_size + cell_spacing), base_pos.
y + (n / 16) * (cell_size + cell_spacing));
22890 ImVec2 cell_p2(cell_p1.
x + cell_size, cell_p1.
y + cell_size);
22893 if (!glyph || (src_mask & (1 << glyph->
SourceIdx)) == 0)
22895 font->
RenderChar(draw_list, cell_size, cell_p1, glyph_col, (
ImWchar)(base + n));
22902 Dummy(
ImVec2((cell_size + cell_spacing) * 16, (cell_size + cell_spacing) * 16));
22913 Text(
"Pos: (%.2f,%.2f)->(%.2f,%.2f)", glyph->
X0, glyph->
Y0, glyph->
X1, glyph->
Y1);
22914 Text(
"UV: (%.3f,%.3f)->(%.3f,%.3f)", glyph->
U0, glyph->
V0, glyph->
U1, glyph->
V1);
22918 Text(
"PackId: %d (%dx%d rect at %d,%d)", glyph->
PackId, r->
w, r->
h, r->
x, r->
y);
22944 p +=
ImFormatString(p, buf_end - p,
"%s 0x%08X (%d tabs)%s {", label, tab_bar->
ID, tab_bar->
Tabs.
Size, is_active ?
"" :
" *Inactive*");
22945 for (
int tab_n = 0; tab_n <
ImMin(tab_bar->
Tabs.
Size, 3); tab_n++)
22963 for (
int tab_n = 0; tab_n < tab_bar->
Tabs.
Size; tab_n++)
22969 Text(
"%02d%c Tab 0x%08X '%s' Offset: %.2f, Width: %.2f/%.2f",
22987 BulletText(
"Main Pos: (%.0f,%.0f), Size: (%.0f,%.0f)\nFrameBufferScale: (%.2f,%.2f)\nWorkArea Inset Left: %.0f Top: %.0f, Right: %.0f, Bottom: %.0f\nMonitor: %d, DpiScale: %.0f%%",
22993 BulletText(
"Flags: 0x%04X =%s%s%s%s%s%s%s%s%s%s%s%s%s", viewport->
Flags,
23016 BulletText(
"%s %d: DPI %.0f%%\n MainMin (%.0f,%.0f), MainMax (%.0f,%.0f), MainSize (%.0f,%.0f)\n WorkMin (%.0f,%.0f), WorkMax (%.0f,%.0f), WorkSize (%.0f,%.0f)",
23017 label, idx, monitor->
DpiScale * 100.0f,
23024 if (window == NULL)
23031 const bool is_active = window->
WasActive;
23034 const bool open =
TreeNodeEx(label, tree_node_flags,
"%s '%s'%s", label, window->
Name, is_active ?
"" :
" *Inactive*");
23042 TextDisabled(
"Note: some memory buffers have been compacted/freed.");
23049 BulletText(
"Pos: (%.1f,%.1f), Size: (%.1f,%.1f), ContentSize (%.1f,%.1f) Ideal (%.1f,%.1f)", window->
Pos.
x, window->
Pos.
y, window->
Size.
x, window->
Size.
y, window->
ContentSize.
x, window->
ContentSize.
y, window->
ContentSizeIdeal.
x, window->
ContentSizeIdeal.
y);
23050 BulletText(
"Flags: 0x%08X (%s%s%s%s%s%s%s%s%s..)", flags,
23075 BulletText(
"NavPreferredScoringPosRel[%d] = {%.1f,%.1f)", layer, (pr[layer].x == FLT_MAX ? -99999.0f : pr[layer].x), (pr[layer].y == FLT_MAX ? -99999.0f : pr[layer].y));
23103 Text(
"0x%08X \"%s\" Pos (%d,%d) Size (%d,%d) Collapsed=%d",
23111 if (!
TreeNode(label,
"%s (%d)", label, windows->
Size))
23113 for (
int i = windows->
Size - 1; i >= 0; i--)
23125 for (
int i = 0; i < windows_size; i++)
23147 va_start(args, fmt);
23164#ifdef IMGUI_ENABLE_TEST_ENGINE
23167 const bool trailing_carriage_return = (g.
DebugLogBuf[new_size - 1] ==
'\n');
23169 IMGUI_TEST_ENGINE_LOG(
"%.*s", new_size - old_size - (trailing_carriage_return ? 1 : 0), g.
DebugLogBuf.
begin() + old_size);
23190 if (highlight_errors)
23197 if (highlight_errors)
23204 ImGui::SetItemTooltip(
"Hold SHIFT when clicking to enable for 2 frames only (useful for spammy log entries)");
23251#ifndef IMGUI_ENABLE_TEST_ENGINE
23255#ifndef IMGUI_ENABLE_TEST_ENGINE
23268 while (clipper.
Step())
23287 for (
const char* p = line_begin; p <= line_end - 10; p++)
23290 if (p[0] !=
'0' || (p[1] !=
'x' && p[1] !=
'X') || sscanf(p + 2,
"%X", &
id) != 1 ||
ImCharIsXdigitA(p[10]))
23408 for (
int mouse_button = 0; mouse_button < 3; mouse_button++)
23414 Text(
"HoveredId: 0x%08X", hovered_id);
23415 Text(
"Press ESC to abort picking.");
23416 const char* mouse_button_names[] = {
"Left",
"Right",
"Middle" };
23417 if (change_mapping)
23418 Text(
"Remap w/ Ctrl+Shift: click anywhere to select new mouse button.");
23438 if (tool->
QueryId != query_id)
23449 if (stack_level >= 0 && stack_level < tool->Results.Size)
23450 if (tool->
Results[stack_level].QuerySuccess || tool->
Results[stack_level].QueryFrameCount > 2)
23455 if (stack_level == -1)
23457 if (stack_level >= 0 && stack_level < tool->Results.Size)
23460 tool->
Results[stack_level].QueryFrameCount++;
23477 for (
int n = 0; n < window->
IDStack.
Size + 1; n++)
23478 tool->
Results[n].ID = (n < window->IDStack.Size) ? window->
IDStack[n] : id;
23501 if (info->
Desc[0] != 0)
23517 return ImFormatString(buf, buf_size, format_for_ui ?
"\"%s\" [window]" :
"%s", window->
Name);
23522#ifdef IMGUI_ENABLE_TEST_ENGINE
23523 if (
const char* label = ImGuiTestEngine_FindItemDebugLabel(
GImGui, info->
ID))
23524 return ImFormatString(buf, buf_size, format_for_ui ?
"??? \"%s\"" :
"%s", label);
23546 for (
int stack_n = 0; stack_n < tool->
Results.
Size; stack_n++)
23548 char level_desc[256];
23551 for (
int n = 0; level_desc[n]; n++)
23553 if (level_desc[n] ==
'/')
23560 MetricsHelpMarker(
"Hover an item with the mouse to display elements of the ID Stack leading to the item's final ID.\nEach level of the stack correspond to a PushID() call.\nAll levels of the stack are hashed together to make the final ID of a widget (ID displayed at the bottom level of the stack).\nRead FAQ entry about the ID stack for details.");
23567 TextColored((time_since_copy >= 0.0f && time_since_copy < 0.75f &&
ImFmod(time_since_copy, 0.25f) < 0.25f * 0.5f) ?
ImVec4(1.f, 1.f, 0.3f, 1.f) :
ImVec4(),
"*COPIED*");
23575#ifdef IMGUI_ENABLE_TEST_ENGINE
23576 Text(
"- Label \"%s\"", tool->
QueryId ? ImGuiTestEngine_FindItemDebugLabel(&g, tool->
QueryId) :
"");
23594 Text(
"0x%08X", (n > 0) ? tool->
Results[n - 1].ID : 0);
23599 Text(
"0x%08X", info->
ID);
23631#if !defined(IMGUI_DISABLE_DEMO_WINDOWS) || !defined(IMGUI_DISABLE_DEBUG_TOOLS)
23643 if (
Selectable(font->GetDebugName(), font == font_current))
23645 if (font == font_current)
23654 "- Load additional fonts with io.Fonts->AddFontXXX() functions.\n"
23655 "- Read FAQ and docs/FONTS.md for more details.");
23658 "- Load additional fonts with io.Fonts->AddFontXXX() functions.\n"
23659 "- The font atlas is built when calling io.Fonts->GetTexDataAsXXXX() or io.Fonts->Build().\n"
23660 "- Read FAQ and docs/FONTS.md for more details.\n"
23661 "- If you need to add/remove fonts at runtime (e.g. for DPI change), do it before calling NewFrame().");
23669#ifdef IMGUI_INCLUDE_IMGUI_USER_INL
23670#include "imgui_user.inl"
static ImGuiWindow * FindWindowNavFocusable(int i_start, int i_stop, int dir)
const char * ImStreolRange(const char *str, const char *str_end)
char * ImStrdupcpy(char *dst, size_t *p_dst_size, const char *src)
static const char * GetMouseSourceName(ImGuiMouseSource source)
static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow *window)
static int GetWindowDisplayLayer(ImGuiWindow *window)
const char * ImStrbol(const char *buf_mid_line, const char *buf_begin)
static bool IsKeyChordPotentiallyCharInput(ImGuiKeyChord key_chord)
static ImVec2 CalcWindowSizeAfterConstraint(ImGuiWindow *window, const ImVec2 &size_desired)
static void InitViewportDrawData(ImGuiViewportP *viewport)
static bool IsWindowActiveAndVisible(ImGuiWindow *window)
static int ImTextCharToUtf8_inline(char *buf, int buf_size, unsigned int c)
static ImGuiWindow * FindBestWheelingWindow(const ImVec2 &wheel)
static bool DockNodeIsDropAllowedOne(ImGuiWindow *payload, ImGuiWindow *host_window)
static const char * GetInputSourceName(ImGuiInputSource source)
void * ImMemdup(const void *src, size_t size)
#define va_copy(dest, src)
static const float NAV_WINDOWING_HIGHLIGHT_DELAY
static float NavScoreItemDistInterval(float cand_min, float cand_max, float curr_min, float curr_max)
static void ApplyWindowSettings(ImGuiWindow *window, ImGuiWindowSettings *settings)
char * ImStrdup(const char *str)
static const char * Platform_GetClipboardTextFn_DefaultImpl(ImGuiContext *ctx)
static void WindowSettingsHandler_WriteAll(ImGuiContext *, ImGuiSettingsHandler *, ImGuiTextBuffer *buf)
static int StackToolFormatLevelInfo(ImGuiIDStackTool *tool, int n, bool format_for_ui, char *buf, size_t buf_size)
static ImGuiDir ImGetDirQuadrantFromDelta(float dx, float dy)
static void ClampWindowPos(ImGuiWindow *window, const ImRect &visibility_rect)
static void NavBiasScoringRect(ImRect &r, ImVec2 &preferred_pos_rel, ImGuiDir move_dir, ImGuiNavMoveFlags move_flags)
int ImFormatStringV(char *buf, size_t buf_size, const char *fmt, va_list args)
static ImGuiWindow * GetCombinedRootWindow(ImGuiWindow *window, bool popup_hierarchy, bool dock_hierarchy)
static ImGuiKeyChord GetMergedModsFromKeys()
static int IMGUI_CDECL DockNodeComparerDepthMostFirst(const void *lhs, const void *rhs)
static const ImVec2 TOOLTIP_DEFAULT_OFFSET_MOUSE
static void UpdateAliasKey(ImGuiKey key, bool v, float analog_value)
static int CalcFontGlyphSrcOverlapMask(ImFontAtlas *atlas, ImFont *font, unsigned int codepoint)
ImVec2 ImBezierCubicClosestPointCasteljau(const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, const ImVec2 &p4, const ImVec2 &p, float tess_tol)
static void Platform_SetImeDataFn_DefaultImpl(ImGuiContext *ctx, ImGuiViewport *viewport, ImGuiPlatformImeData *data)
static const ImGuiCol GWindowDockStyleColors[ImGuiWindowDockStyleCol_COUNT]
static bool ImGuiListClipper_StepInternal(ImGuiListClipper *clipper)
static ImGuiMemFreeFunc GImAllocatorFreeFunc
static ImGuiWindow * CreateNewWindow(const char *name, ImGuiWindowFlags flags)
static const ImGuiStyleVarInfo GStyleVarsInfo[]
static void NavUpdateWindowingTarget(int focus_change_dir)
static const float DOCKING_TRANSPARENT_PAYLOAD_ALPHA
static void ScaleWindow(ImGuiWindow *window, float scale)
ImGuiStoragePair * ImLowerBound(ImGuiStoragePair *in_begin, ImGuiStoragePair *in_end, ImGuiID key)
static const ImGuiResizeGripDef resize_grip_def[4]
void ImTriangleBarycentricCoords(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p, float &out_u, float &out_v, float &out_w)
static void * GImAllocatorUserData
static int IMGUI_CDECL ChildWindowComparer(const void *lhs, const void *rhs)
static float CalcDelayFromHoveredFlags(ImGuiHoveredFlags flags)
static ImGuiDockNode * DockBuilderCopyNodeRec(ImGuiDockNode *src_node, ImGuiID dst_node_id_if_known, ImVector< ImGuiID > *out_node_remap_pairs)
static void FlattenDrawDataIntoSingleLayer(ImDrawDataBuilder *builder)
static void WindowSettingsHandler_ApplyAll(ImGuiContext *, ImGuiSettingsHandler *)
void ImFormatStringToTempBuffer(const char **out_buf, const char **out_buf_end, const char *fmt,...)
int ImTextStrToUtf8(char *out_buf, int out_buf_size, const ImWchar *in_text, const ImWchar *in_text_end)
static void DockNodeHideWindowDuringHostWindowCreation(ImGuiWindow *window)
static void DebugNodeDockNodeFlags(ImGuiDockNodeFlags *p_flags, const char *label, bool enabled)
static ImGuiWindow * GetWindowForTitleAndMenuHeight(ImGuiWindow *window)
static void ImGuiListClipper_SeekCursorAndSetupPrevLine(float pos_y, float line_height)
static ImGuiWindow * FindFrontMostVisibleChildWindow(ImGuiWindow *window)
static void SetCurrentWindow(ImGuiWindow *window)
static ImRect GetResizeBorderRect(ImGuiWindow *window, int border_n, float perp_padding, float thickness)
static void InitOrLoadWindowSettings(ImGuiWindow *window, ImGuiWindowSettings *settings)
static void LogTextV(ImGuiContext &g, const char *fmt, va_list args)
int ImStrnicmp(const char *str1, const char *str2, size_t count)
static float CalcScrollEdgeSnap(float target, float snap_min, float snap_max, float snap_threshold, float center_ratio)
static void AddWindowToDrawData(ImGuiWindow *window, int layer)
static void DockNodeTreeUpdateSplitterFindTouchingNode(ImGuiDockNode *node, ImGuiAxis axis, int side, ImVector< ImGuiDockNode * > *touching_nodes)
int ImStrlenW(const ImWchar *str)
const char * ImStrchrRange(const char *str, const char *str_end, char c)
static void CalcWindowContentSizes(ImGuiWindow *window, ImVec2 *content_size_current, ImVec2 *content_size_ideal)
static const ImVec2 TOOLTIP_DEFAULT_PIVOT_TOUCH
static void ImGuiListClipper_SortAndFuseRanges(ImVector< ImGuiListClipperRange > &ranges, int offset=0)
static IM_MSVC_RUNTIME_CHECKS_OFF int IMGUI_CDECL PairComparerByID(const void *lhs, const void *rhs)
int ImFormatString(char *buf, size_t buf_size, const char *fmt,...)
static bool GetSkipItemForListClipping()
ImVec2 ImLineClosestPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &p)
static const char *const GKeyNames[]
static bool IsDockNodeTitleBarHighlighted(ImGuiDockNode *node, ImGuiDockNode *root_node)
static void FreeWrapper(void *ptr, void *user_data)
static ImGuiCol GetWindowBgColorIdx(ImGuiWindow *window)
static const char * FormatTextureIDForDebugDisplay(char *buf, int buf_size, ImTextureID tex_id)
void ImStrTrimBlanks(char *buf)
void ImFormatStringToTempBufferV(const char **out_buf, const char **out_buf_end, const char *fmt, va_list args)
static const ImGuiResizeBorderDef resize_border_def[4]
static void ShowDebugLogFlag(const char *name, ImGuiDebugLogFlags flags)
IM_MSVC_RUNTIME_CHECKS_RESTORE IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b)
static void DebugPrintInputEvent(const char *prefix, const ImGuiInputEvent *e)
static ImDrawList * GetViewportBgFgDrawList(ImGuiViewportP *viewport, size_t drawlist_no, const char *drawlist_name)
static void DockSettingsHandler_DockNodeToSettings(ImGuiDockContext *dc, ImGuiDockNode *node, int depth)
static const float WINDOWS_MOUSE_WHEEL_SCROLL_LOCK_TIMER
static void WindowSettingsHandler_ReadLine(ImGuiContext *, ImGuiSettingsHandler *, void *entry, const char *line)
const char * ImStrSkipBlank(const char *str)
static const ImVec2 TOOLTIP_DEFAULT_OFFSET_TOUCH
static const float FONT_DEFAULT_SIZE
static void WindowSettingsHandler_ClearAll(ImGuiContext *, ImGuiSettingsHandler *)
const char * ImTextCharToUtf8(char out_buf[5], unsigned int c)
static void * WindowSettingsHandler_ReadOpen(ImGuiContext *, ImGuiSettingsHandler *, const char *name)
static int IMGUI_CDECL TabItemComparerByDockOrder(const void *lhs, const void *rhs)
static const ImU32 DEBUG_LOCATE_ITEM_COLOR
static ImGuiHoveredFlags ApplyHoverFlagsForTooltip(ImGuiHoveredFlags user_flags, ImGuiHoveredFlags shared_flags)
static void SetWindowConditionAllowFlags(ImGuiWindow *window, ImGuiCond flags, bool enabled)
static ImGuiWindow * GetWindowForTitleDisplay(ImGuiWindow *window)
static void SetWindowActiveForSkipRefresh(ImGuiWindow *window)
static void Platform_SetClipboardTextFn_DefaultImpl(ImGuiContext *ctx, const char *text)
static void LockWheelingWindow(ImGuiWindow *window, float wheel_amount)
static void MetricsHelpMarker(const char *desc)
static void AddRootWindowToDrawData(ImGuiWindow *window)
static void TranslateWindow(ImGuiWindow *window, const ImVec2 &delta)
bool ImTriangleContainsPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p)
static void DockNodeFindInfo(ImGuiDockNode *node, ImGuiDockNodeTreeInfo *info)
static void DockNodeSetupHostWindow(ImGuiDockNode *node, ImGuiWindow *host_window)
ImU64 ImFileWrite(const void *data, ImU64 sz, ImU64 count, ImFileHandle f)
static const float NAV_ACTIVATE_HIGHLIGHT_TIMER
#define IMGUI_DEBUG_NAV_SCORING
int ImTextCountUtf8BytesFromStr(const ImWchar *in_text, const ImWchar *in_text_end)
static void * MallocWrapper(size_t size, void *user_data)
static void SetupDrawListSharedData()
static int IMGUI_CDECL ViewportComparerByLastFocusedStampCount(const void *lhs, const void *rhs)
ImU64 ImFileRead(void *data, ImU64 sz, ImU64 count, ImFileHandle f)
ImGuiID ImHashStr(const char *data_p, size_t data_size, ImGuiID seed)
static const float WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER
static bool Platform_OpenInShellFn_DefaultImpl(ImGuiContext *ctx, const char *path)
static const ImGuiLocEntry GLocalizationEntriesEnUS[]
static void CalcResizePosSizeFromAnyCorner(ImGuiWindow *window, const ImVec2 &corner_target, const ImVec2 &corner_norm, ImVec2 *out_pos, ImVec2 *out_size)
const char * ImTextFindPreviousUtf8Codepoint(const char *in_text_start, const char *in_text_curr)
static ImGuiMemAllocFunc GImAllocatorAllocFunc
static int CalcRoutingScore(ImGuiID focus_scope_id, ImGuiID owner_id, ImGuiInputFlags flags)
IM_MSVC_RUNTIME_CHECKS_OFF int ImTextCharFromUtf8(unsigned int *out_char, const char *in_text, const char *in_text_end)
static ImGuiInputEvent * FindLatestInputEvent(ImGuiContext *ctx, ImGuiInputEventType type, int arg=-1)
int ImTextCountCharsFromUtf8(const char *in_text, const char *in_text_end)
@ ImGuiDockRequestType_Split
@ ImGuiDockRequestType_Dock
@ ImGuiDockRequestType_None
@ ImGuiDockRequestType_Undock
bool ImFileClose(ImFileHandle f)
static const float NAV_WINDOWING_LIST_APPEAR_DELAY
static void SameLineOrWrap(const ImVec2 &size)
static ImVec2 CalcWindowAutoFitSize(ImGuiWindow *window, const ImVec2 &size_contents)
void * ImFileLoadToMemory(const char *filename, const char *mode, size_t *out_file_size, int padding_bytes)
static void ImBezierCubicClosestPointCasteljauStep(const ImVec2 &p, ImVec2 &p_closest, ImVec2 &p_last, float &p_closest_dist2, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float tess_tol, int level)
static void RenderViewportsThumbnails()
const char * ImStristr(const char *haystack, const char *haystack_end, const char *needle, const char *needle_end)
static const char * GetFallbackWindowNameForWindowingList(ImGuiWindow *window)
ImVec2 ImBezierCubicClosestPoint(const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, const ImVec2 &p4, const ImVec2 &p, int num_segments)
static ImGuiID GetRoutingIdFromOwnerId(ImGuiID owner_id)
ImGuiID ImHashData(const void *data_p, size_t data_size, ImGuiID seed)
ImU64 ImFileGetSize(ImFileHandle f)
int ImStricmp(const char *str1, const char *str2)
int ImTextCountUtf8BytesFromChar(const char *in_text, const char *in_text_end)
static ImVec2 CalcWindowMinSize(ImGuiWindow *window)
ImFileHandle ImFileOpen(const char *filename, const char *mode)
static void DebugFlashStyleColorStop()
static void RenderWindowOuterSingleBorder(ImGuiWindow *window, int border_n, ImU32 border_col, float border_size)
int ImTextStrFromUtf8(ImWchar *buf, int buf_size, const char *in_text, const char *in_text_end, const char **in_text_remaining)
void ImStrncpy(char *dst, const char *src, size_t count)
static void AddWindowToSortBuffer(ImVector< ImGuiWindow * > *out_sorted_windows, ImGuiWindow *window)
static void StoreDockStyleForWindow(ImGuiWindow *window)
static IM_MSVC_RUNTIME_CHECKS_RESTORE ImGuiKeyChord GetModForLRModKey(ImGuiKey key)
ImVec2 ImTriangleClosestPoint(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c, const ImVec2 &p)
static const ImU32 GCrc32LookupTable[256]
int ImTextCountLines(const char *in_text, const char *in_text_end)
static ImVec2 FixLargeWindowsWhenUndocking(const ImVec2 &size, ImGuiViewport *ref_viewport)
@ ImGuiFocusedFlags_AnyWindow
@ ImGuiFocusedFlags_DockHierarchy
@ ImGuiFocusedFlags_NoPopupHierarchy
@ ImGuiDragDropFlags_AcceptBeforeDelivery
@ ImGuiDragDropFlags_PayloadNoCrossContext
@ ImGuiDragDropFlags_SourceNoPreviewTooltip
@ ImGuiDragDropFlags_PayloadNoCrossProcess
@ ImGuiDragDropFlags_SourceAllowNullID
@ ImGuiDragDropFlags_None
@ ImGuiDragDropFlags_SourceExtern
@ ImGuiDragDropFlags_AcceptNoDrawDefaultRect
@ ImGuiDragDropFlags_SourceNoDisableHover
@ ImGuiDragDropFlags_PayloadAutoExpire
@ ImGuiDragDropFlags_SourceNoHoldToOpenOthers
@ ImGuiDragDropFlags_AcceptNoPreviewTooltip
#define IM_COL32(R, G, B, A)
@ ImGuiHoveredFlags_DelayShort
@ ImGuiHoveredFlags_DelayNone
@ ImGuiHoveredFlags_ForTooltip
@ ImGuiHoveredFlags_AllowWhenBlockedByActiveItem
@ ImGuiHoveredFlags_AllowWhenBlockedByPopup
@ ImGuiHoveredFlags_NoNavOverride
@ ImGuiHoveredFlags_AllowWhenOverlappedByItem
@ ImGuiHoveredFlags_Stationary
@ ImGuiHoveredFlags_NoPopupHierarchy
@ ImGuiHoveredFlags_NoSharedDelay
@ ImGuiHoveredFlags_ChildWindows
@ ImGuiHoveredFlags_RootWindow
@ ImGuiHoveredFlags_AnyWindow
@ ImGuiHoveredFlags_AllowWhenDisabled
@ ImGuiHoveredFlags_DockHierarchy
@ ImGuiHoveredFlags_DelayNormal
@ ImGuiHoveredFlags_AllowWhenOverlappedByWindow
@ ImGuiConfigFlags_NoMouse
@ ImGuiConfigFlags_DpiEnableScaleFonts
@ ImGuiConfigFlags_NavEnableSetMousePos
@ ImGuiConfigFlags_NoKeyboard
@ ImGuiConfigFlags_NavEnableGamepad
@ ImGuiConfigFlags_ViewportsEnable
@ ImGuiConfigFlags_DockingEnable
@ ImGuiConfigFlags_NavEnableKeyboard
@ ImGuiConfigFlags_NavNoCaptureKeyboard
@ ImGuiConfigFlags_DpiEnableScaleViewports
void *(* ImGuiMemAllocFunc)(size_t sz, void *user_data)
void(* ImGuiSizeCallback)(ImGuiSizeCallbackData *data)
IM_MSVC_RUNTIME_CHECKS_RESTORE typedef ImU64 ImTextureID
@ ImDrawListFlags_AntiAliasedLinesUseTex
@ ImDrawListFlags_AntiAliasedFill
@ ImDrawListFlags_AntiAliasedLines
@ ImDrawListFlags_AllowVtxOffset
@ ImGuiBackendFlags_RendererHasTextures
@ ImGuiBackendFlags_HasGamepad
@ ImGuiBackendFlags_HasMouseHoveredViewport
@ ImGuiBackendFlags_RendererHasViewports
@ ImGuiBackendFlags_HasSetMousePos
@ ImGuiBackendFlags_PlatformHasViewports
@ ImGuiBackendFlags_RendererHasVtxOffset
@ ImGuiMouseCursor_ResizeNWSE
@ ImGuiMouseCursor_Progress
@ ImGuiMouseCursor_ResizeEW
@ ImGuiMouseCursor_ResizeNS
@ ImGuiMouseCursor_ResizeNESW
@ ImGuiChildFlags_AlwaysAutoResize
@ ImGuiChildFlags_AlwaysUseWindowPadding
@ ImGuiChildFlags_AutoResizeY
@ ImGuiChildFlags_FrameStyle
@ ImGuiChildFlags_ResizeY
@ ImGuiChildFlags_AutoResizeX
@ ImGuiChildFlags_ResizeX
@ ImGuiChildFlags_NavFlattened
@ ImGuiChildFlags_Borders
@ ImGuiMouseSource_TouchScreen
#define IM_PLACEMENT_NEW(_PTR)
@ ImGuiTableColumnFlags_WidthFixed
@ ImGuiTableColumnFlags_WidthStretch
@ ImGuiPopupFlags_MouseButtonMask_
@ ImGuiPopupFlags_AnyPopupLevel
@ ImGuiPopupFlags_NoOpenOverExistingPopup
@ ImGuiPopupFlags_AnyPopupId
@ ImGuiPopupFlags_NoOpenOverItems
@ ImGuiPopupFlags_NoReopen
@ ImGuiTabBarFlags_NoCloseWithMiddleMouseButton
@ ImGuiTabBarFlags_DrawSelectedOverline
@ ImGuiTabBarFlags_AutoSelectNewTabs
@ ImGuiTabBarFlags_Reorderable
@ ImGuiTabItemFlags_UnsavedDocument
@ ImGuiTabItemFlags_NoCloseWithMiddleMouseButton
@ ImGuiItemFlags_AllowDuplicateId
@ ImGuiItemFlags_NoTabStop
@ ImGuiItemFlags_NoNavDefaultFocus
@ ImGuiItemFlags_AutoClosePopups
@ ImGuiStyleVar_ImageBorderSize
@ ImGuiStyleVar_ChildRounding
@ ImGuiStyleVar_WindowRounding
@ ImGuiStyleVar_FramePadding
@ ImGuiStyleVar_WindowPadding
@ ImGuiStyleVar_ChildBorderSize
@ ImGuiStyleVar_WindowBorderSize
@ ImGuiInputTextFlags_ReadOnly
@ ImGuiTableBgTarget_CellBg
#define IM_MSVC_RUNTIME_CHECKS_OFF
@ ImFontAtlasFlags_NoBakedLines
@ ImGuiInputFlags_RouteOverActive
@ ImGuiInputFlags_RouteFromRootWindow
@ ImGuiInputFlags_RouteOverFocused
@ ImGuiInputFlags_RouteActive
@ ImGuiInputFlags_RouteGlobal
@ ImGuiInputFlags_RouteFocused
@ ImGuiInputFlags_Tooltip
@ ImGuiInputFlags_RouteAlways
@ ImGuiInputFlags_RouteUnlessBgFocused
@ ImGuiCol_FrameBgHovered
@ ImGuiCol_TitleBgCollapsed
@ ImGuiCol_PlotHistogramHovered
@ ImGuiCol_TextSelectedBg
@ ImGuiCol_DockingPreview
@ ImGuiCol_ModalWindowDimBg
@ ImGuiCol_TabSelectedOverline
@ ImGuiCol_DragDropTarget
@ ImGuiCol_SeparatorActive
@ ImGuiCol_ScrollbarGrabActive
@ ImGuiCol_TabDimmedSelectedOverline
@ ImGuiCol_ResizeGripActive
@ ImGuiCol_InputTextCursor
@ ImGuiCol_TableBorderLight
@ ImGuiCol_ScrollbarGrabHovered
@ ImGuiCol_ResizeGripHovered
@ ImGuiCol_NavWindowingHighlight
@ ImGuiCol_TableBorderStrong
@ ImGuiCol_DockingEmptyBg
@ ImGuiCol_SliderGrabActive
@ ImGuiCol_SeparatorHovered
@ ImGuiCol_TabDimmedSelected
@ ImGuiCol_NavWindowingDimBg
@ ImGuiCol_PlotLinesHovered
#define IM_UNICODE_CODEPOINT_INVALID
@ ImGuiKey_GamepadFaceRight
@ ImGuiKey_KeypadMultiply
@ ImGuiKey_GamepadLStickDown
@ ImGuiKey_ReservedForModCtrl
@ ImGuiKey_NamedKey_BEGIN
@ ImGuiKey_GamepadDpadDown
@ ImGuiKey_ReservedForModAlt
@ ImGuiKey_ReservedForModShift
@ ImGuiKey_KeypadSubtract
@ ImGuiKey_GamepadLStickUp
@ ImGuiKey_GamepadFaceDown
@ ImGuiKey_GamepadLStickLeft
@ ImGuiKey_ReservedForModSuper
@ ImGuiKey_GamepadDpadRight
@ ImGuiKey_GamepadDpadLeft
@ ImGuiKey_NamedKey_COUNT
@ ImGuiKey_GamepadFaceLeft
@ ImGuiKey_GamepadLStickRight
@ ImGuiDockNodeFlags_None
@ ImGuiDockNodeFlags_AutoHideTabBar
@ ImGuiDockNodeFlags_KeepAliveOnly
@ ImGuiDockNodeFlags_NoDockingOverCentralNode
@ ImGuiDockNodeFlags_PassthruCentralNode
@ ImGuiDockNodeFlags_NoDockingInCentralNode
@ ImGuiDockNodeFlags_NoResize
@ ImGuiDockNodeFlags_NoUndocking
@ ImGuiDockNodeFlags_NoDockingSplit
@ ImGuiTreeNodeFlags_Selected
@ ImGuiTreeNodeFlags_DrawLinesToNodes
@ ImGuiTreeNodeFlags_None
@ ImGuiTreeNodeFlags_DrawLinesFull
@ ImGuiTreeNodeFlags_DrawLinesNone
#define IM_MSVC_RUNTIME_CHECKS_RESTORE
#define ImFontAtlasRectId_Invalid
@ ImGuiViewportFlags_NoTaskBarIcon
@ ImGuiViewportFlags_OwnedByApp
@ ImGuiViewportFlags_NoRendererClear
@ ImGuiViewportFlags_TopMost
@ ImGuiViewportFlags_NoDecoration
@ ImGuiViewportFlags_IsPlatformWindow
@ ImGuiViewportFlags_IsMinimized
@ ImGuiViewportFlags_IsPlatformMonitor
@ ImGuiViewportFlags_NoInputs
@ ImGuiViewportFlags_CanHostOtherWindows
@ ImGuiViewportFlags_NoFocusOnAppearing
@ ImGuiViewportFlags_NoFocusOnClick
@ ImGuiViewportFlags_IsFocused
@ ImGuiViewportFlags_None
@ ImGuiViewportFlags_NoAutoMerge
@ ImGuiWindowFlags_NoInputs
@ ImGuiWindowFlags_NoBackground
@ ImGuiWindowFlags_DockNodeHost
@ ImGuiWindowFlags_NoNavInputs
@ ImGuiWindowFlags_AlwaysUseWindowPadding
@ ImGuiWindowFlags_AlwaysAutoResize
@ ImGuiWindowFlags_MenuBar
@ ImGuiWindowFlags_HorizontalScrollbar
@ ImGuiWindowFlags_Tooltip
@ ImGuiWindowFlags_NoTitleBar
@ ImGuiWindowFlags_NoNavFocus
@ ImGuiWindowFlags_AlwaysVerticalScrollbar
@ ImGuiWindowFlags_NoFocusOnAppearing
@ ImGuiWindowFlags_NoCollapse
@ ImGuiWindowFlags_NoScrollWithMouse
@ ImGuiWindowFlags_NoMouseInputs
@ ImGuiWindowFlags_UnsavedDocument
@ ImGuiWindowFlags_NoSavedSettings
@ ImGuiWindowFlags_NoBringToFrontOnFocus
@ ImGuiWindowFlags_ChildMenu
@ ImGuiWindowFlags_AlwaysHorizontalScrollbar
@ ImGuiWindowFlags_NoDecoration
@ ImGuiWindowFlags_NavFlattened
@ ImGuiWindowFlags_NoMove
@ ImGuiWindowFlags_ChildWindow
@ ImGuiWindowFlags_NoDocking
@ ImGuiWindowFlags_NoResize
@ ImGuiWindowFlags_NoScrollbar
#define IMGUI_VERSION_NUM
void(* ImGuiMemFreeFunc)(void *ptr, void *user_data)
@ ImGuiTableFlags_Borders
@ ImGuiTableFlags_ScrollY
@ ImGuiTableFlags_SizingFixedFit
@ ImGuiTableFlags_Resizable
#define IM_ARRAYSIZE(_ARR)
@ ImGuiColorEditFlags_DefaultOptions_
#define IM_UNICODE_CODEPOINT_MAX
@ ImDrawFlags_RoundCornersBottom
@ ImDrawFlags_RoundCornersTop
void ImFontAtlasRemoveDrawListSharedData(ImFontAtlas *atlas, ImDrawListSharedData *data)
ImTextureRect * ImFontAtlasPackGetRect(ImFontAtlas *atlas, ImFontAtlasRectId id)
const ImFontLoader * ImFontAtlasGetFontLoaderForStbTruetype()
void ImFontAtlasFontDiscardBakes(ImFontAtlas *atlas, ImFont *font, int unused_frames)
void ImFontAtlasBuildMain(ImFontAtlas *atlas)
void ImFontAtlasBuildGetOversampleFactors(ImFontConfig *src, ImFontBaked *baked, int *out_oversample_h, int *out_oversample_v)
ImVec2 ImBezierCubicCalc(const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, const ImVec2 &p4, float t)
bool ImFontAtlasGetMouseCursorTexData(ImFontAtlas *atlas, ImGuiMouseCursor cursor_type, ImVec2 *out_offset, ImVec2 *out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2])
void ImFontAtlasUpdateNewFrame(ImFontAtlas *atlas, int frame_count, bool renderer_has_textures)
IM_MSVC_RUNTIME_CHECKS_RESTORE void ImFontAtlasDebugLogTextureRequests(ImFontAtlas *atlas)
void ImFontAtlasAddDrawListSharedData(ImFontAtlas *atlas, ImDrawListSharedData *data)
const char * ImTextureDataGetFormatName(ImTextureFormat format)
void ImFontAtlasBuildClear(ImFontAtlas *atlas)
const char * ImTextureDataGetStatusName(ImTextureStatus status)
bool ImFontAtlasFontInitOutput(ImFontAtlas *atlas, ImFont *font)
void ImFontAtlasTextureGrow(ImFontAtlas *atlas, int old_tex_w, int old_tex_h)
void ImFontAtlasUpdateDrawListsSharedData(ImFontAtlas *atlas)
void ImFontAtlasFontDestroyOutput(ImFontAtlas *atlas, ImFont *font)
@ ImGuiContextHookType_PendingRemoval_
@ ImGuiContextHookType_RenderPost
@ ImGuiContextHookType_NewFramePost
@ ImGuiContextHookType_RenderPre
@ ImGuiContextHookType_EndFramePre
@ ImGuiContextHookType_NewFramePre
@ ImGuiContextHookType_EndFramePost
@ ImGuiContextHookType_Shutdown
static void ImSwap(T &a, T &b)
#define IM_F32_TO_INT8_SAT(_VAL)
#define IMGUI_DEBUG_PRINTF(_FMT,...)
@ ImGuiScrollFlags_KeepVisibleEdgeY
@ ImGuiScrollFlags_MaskX_
@ ImGuiScrollFlags_NoScrollParent
@ ImGuiScrollFlags_AlwaysCenterX
@ ImGuiScrollFlags_KeepVisibleCenterX
@ ImGuiScrollFlags_AlwaysCenterY
@ ImGuiScrollFlags_MaskY_
@ ImGuiScrollFlags_KeepVisibleEdgeX
@ ImGuiScrollFlags_KeepVisibleCenterY
int ImGuiWindowRefreshFlags
static T ImLerp(T a, T b, float t)
@ ImGuiItemFlags_Disabled
@ ImGuiItemFlags_HasSelectionUserData
@ ImGuiItemFlags_NoMarkEdited
@ ImGuiItemFlags_Inputable
@ ImGuiItemFlags_AllowOverlap
@ ImGuiItemFlags_NoNavDisableMouseHover
@ ImGuiItemFlags_NoWindowHoverableCheck
static float ImLengthSqr(const ImVec2 &lhs)
@ ImGuiWindowDockStyleCol_TabSelected
@ ImGuiWindowDockStyleCol_Text
@ ImGuiWindowDockStyleCol_COUNT
#define IMGUI_DEBUG_LOG_DOCKING(...)
static float ImTrunc(float f)
#define ImGuiKey_Mouse_BEGIN
#define ImGuiKey_NavGamepadTweakFast
#define ImGuiKey_Gamepad_END
@ ImGuiTabBarFlags_SaveSettings
@ ImGuiTabBarFlags_IsFocused
@ ImGuiTabBarFlags_DockNode
static bool ImIsPowerOfTwo(int v)
@ ImGuiLocKey_DockingDragToUndockOrMoveNode
@ ImGuiLocKey_WindowingMainMenuBar
@ ImGuiLocKey_TableSizeAllDefault
@ ImGuiLocKey_DockingHideTabBar
@ ImGuiLocKey_TableResetOrder
@ ImGuiLocKey_WindowingUntitled
@ ImGuiLocKey_WindowingPopup
@ ImGuiLocKey_TableSizeAllFit
@ ImGuiLocKey_DockingHoldShiftToDock
@ ImGuiLocKey_TableSizeOne
@ ImGuiButtonFlags_AllowOverlap
@ ImGuiButtonFlags_FlattenChildren
@ ImGuiButtonFlags_NoNavFocus
#define IMGUI_DEBUG_LOG_INPUTROUTING(...)
static IM_MSVC_RUNTIME_CHECKS_OFF char ImToUpper(char c)
static float ImFloor(float f)
@ ImGuiDebugLogFlags_EventDocking
@ ImGuiDebugLogFlags_EventViewport
@ ImGuiDebugLogFlags_EventSelection
@ ImGuiDebugLogFlags_EventClipper
@ ImGuiDebugLogFlags_OutputToTTY
@ ImGuiDebugLogFlags_EventError
@ ImGuiDebugLogFlags_EventFocus
@ ImGuiDebugLogFlags_EventActiveId
@ ImGuiDebugLogFlags_OutputToTestEngine
@ ImGuiDebugLogFlags_EventNav
@ ImGuiDebugLogFlags_EventIO
@ ImGuiDebugLogFlags_EventInputRouting
@ ImGuiDebugLogFlags_EventMask_
@ ImGuiDebugLogFlags_None
@ ImGuiDebugLogFlags_EventFont
@ ImGuiDebugLogFlags_EventPopup
#define ImGuiKey_NavGamepadCancel
#define IMGUI_DEBUG_LOG_CLIPPER(...)
@ ImGuiDockNodeState_Unknown
@ ImGuiDockNodeState_HostWindowVisible
@ ImGuiDockNodeState_HostWindowHiddenBecauseWindowsAreResizing
@ ImGuiDockNodeState_HostWindowHiddenBecauseSingleWindow
IMGUI_API char * ImStrdup(const char *str)
#define ImGuiKey_NavGamepadActivate
#define IMGUI_DEBUG_LOG_ACTIVEID(...)
static T ImClamp(T v, T mn, T mx)
#define DOCKING_HOST_DRAW_CHANNEL_FG
#define ImGuiKeyOwner_NoOwner
@ ImGuiFocusRequestFlags_RestoreFocusedChild
@ ImGuiFocusRequestFlags_UnlessBelowModal
@ ImGuiFocusRequestFlags_None
@ ImGuiTooltipFlags_OverridePrevious
static void ImQsort(void *base, size_t count, size_t size_of_element, int(IMGUI_CDECL *compare_func)(void const *, void const *))
@ ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone
@ ImGuiInputFlags_RepeatRateMask_
@ ImGuiInputFlags_SupportedByIsMouseClicked
@ ImGuiInputFlags_RepeatUntilMask_
@ ImGuiInputFlags_CondActive
@ ImGuiInputFlags_RepeatRateNavTweak
@ ImGuiInputFlags_CondDefault_
@ ImGuiInputFlags_SupportedByShortcut
@ ImGuiInputFlags_SupportedBySetItemKeyOwner
@ ImGuiInputFlags_RepeatRateDefault
@ ImGuiInputFlags_LockUntilRelease
@ ImGuiInputFlags_RepeatMask_
@ ImGuiInputFlags_SupportedBySetNextItemShortcut
@ ImGuiInputFlags_CondHovered
@ ImGuiInputFlags_LockThisFrame
@ ImGuiInputFlags_CondMask_
@ ImGuiInputFlags_SupportedByIsKeyPressed
@ ImGuiInputFlags_RepeatUntilOtherKeyPress
@ ImGuiInputFlags_RouteTypeMask_
@ ImGuiInputFlags_RepeatRateNavMove
@ ImGuiInputFlags_SupportedBySetKeyOwner
@ ImGuiInputFlags_RepeatUntilKeyModsChange
static T ImMax(T lhs, T rhs)
@ ImGuiItemStatusFlags_ToggledSelection
@ ImGuiItemStatusFlags_HasDisplayRect
@ ImGuiItemStatusFlags_HoveredRect
@ ImGuiItemStatusFlags_Deactivated
@ ImGuiItemStatusFlags_HasShortcut
@ ImGuiItemStatusFlags_Edited
@ ImGuiItemStatusFlags_HasDeactivated
@ ImGuiItemStatusFlags_HoveredWindow
@ ImGuiItemStatusFlags_None
@ ImGuiItemStatusFlags_HasClipRect
@ ImGuiItemStatusFlags_Visible
@ ImGuiItemStatusFlags_ToggledOpen
#define ImGuiKeyOwner_Any
@ ImGuiDockNodeFlags_NoResizeX
@ ImGuiDockNodeFlags_DockedWindowsInFocusRoute
@ ImGuiDockNodeFlags_NoDockingOverMe
@ ImGuiDockNodeFlags_NoDockingSplitOther
@ ImGuiDockNodeFlags_NoResizeY
@ ImGuiDockNodeFlags_DockSpace
@ ImGuiDockNodeFlags_SavedFlagsMask_
@ ImGuiDockNodeFlags_NoWindowMenuButton
@ ImGuiDockNodeFlags_NoDockingOverEmpty
@ ImGuiDockNodeFlags_NoDocking
@ ImGuiDockNodeFlags_SharedFlagsInheritMask_
@ ImGuiDockNodeFlags_NoDockingOverOther
@ ImGuiDockNodeFlags_CentralNode
@ ImGuiDockNodeFlags_NoTabBar
@ ImGuiDockNodeFlags_HiddenTabBar
@ ImGuiDockNodeFlags_LocalFlagsTransferMask_
@ ImGuiDockNodeFlags_NoCloseButton
static T ImMin(T lhs, T rhs)
static float ImExponentialMovingAverage(float avg, float sample, int n)
@ ImGuiWindowRefreshFlags_TryToAvoidRefresh
@ ImGuiWindowRefreshFlags_RefreshOnHover
@ ImGuiWindowRefreshFlags_RefreshOnFocus
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID, _LABEL, _FLAGS)
IMGUI_API ImGuiID ImHashStr(const char *data, size_t data_size=0, ImGuiID seed=0)
@ ImGuiHoveredFlags_AllowedMaskForIsItemHovered
@ ImGuiHoveredFlags_AllowedMaskForIsWindowHovered
#define ImGuiKey_NavGamepadMenu
static float ImRound64(float f)
#define ImGuiSelectionUserData_Invalid
@ ImGuiInputEventType_Focus
@ ImGuiInputEventType_MouseViewport
@ ImGuiInputEventType_Text
@ ImGuiInputEventType_MouseWheel
@ ImGuiInputEventType_Key
@ ImGuiInputEventType_MousePos
@ ImGuiInputEventType_MouseButton
#define IMGUI_TEST_ENGINE_ITEM_ADD(_BB, _ID)
@ ImGuiInputSource_Gamepad
@ ImGuiInputSource_Keyboard
#define ImGuiKey_NavGamepadInput
int ImGuiNavRenderCursorFlags
int ImGuiFocusRequestFlags
@ ImGuiPopupPositionPolicy_ComboBox
@ ImGuiPopupPositionPolicy_Tooltip
@ ImGuiPopupPositionPolicy_Default
#define IMGUI_DEBUG_LOG_FOCUS(...)
ImS16 ImGuiKeyRoutingIndex
#define IMGUI_DEBUG_LOG_ERROR(...)
#define ImGuiKey_Keyboard_END
#define IM_ASSERT_PARANOID(_EXPR)
static float ImTrunc64(float f)
#define IMGUI_DEBUG_LOG_NAV(...)
static unsigned int ImCountSetBits(unsigned int v)
@ ImGuiTabItemFlags_Unsorted
@ ImGuiTabItemFlags_Button
static bool ImCharIsXdigitA(char c)
#define ImGuiKey_Mouse_END
@ ImGuiNextItemDataFlags_None
@ ImGuiNextItemDataFlags_HasShortcut
@ ImGuiNextItemDataFlags_HasWidth
#define IM_STATIC_ASSERT(_COND)
@ ImGuiNextWindowDataFlags_HasSizeConstraint
@ ImGuiNextWindowDataFlags_HasSize
@ ImGuiNextWindowDataFlags_HasFocus
@ ImGuiNextWindowDataFlags_HasBgAlpha
@ ImGuiNextWindowDataFlags_HasViewport
@ ImGuiNextWindowDataFlags_HasChildFlags
@ ImGuiNextWindowDataFlags_HasWindowClass
@ ImGuiNextWindowDataFlags_HasContentSize
@ ImGuiNextWindowDataFlags_HasScroll
@ ImGuiNextWindowDataFlags_HasDock
@ ImGuiNextWindowDataFlags_HasCollapsed
@ ImGuiNextWindowDataFlags_HasRefreshPolicy
@ ImGuiNextWindowDataFlags_HasPos
#define IMGUI_DEBUG_LOG_VIEWPORT(...)
@ ImGuiLayoutType_Vertical
@ ImGuiLayoutType_Horizontal
static bool ImCharIsBlankA(char c)
static bool ImIsFloatAboveGuaranteedIntegerPrecision(float f)
#define IMGUI_DEBUG_LOG_POPUP(...)
@ ImGuiLogFlags_OutputTTY
@ ImGuiLogFlags_OutputMask_
@ ImGuiLogFlags_OutputFile
@ ImGuiLogFlags_OutputBuffer
@ ImGuiLogFlags_OutputClipboard
@ ImGuiActivateFlags_PreferInput
@ ImGuiActivateFlags_TryToPreserveState
@ ImGuiActivateFlags_FromTabbing
@ ImGuiActivateFlags_FromShortcut
@ ImGuiActivateFlags_None
@ ImGuiActivateFlags_PreferTweak
static float ImSaturate(float f)
@ ImGuiNavMoveFlags_Forwarded
@ ImGuiNavMoveFlags_WrapY
@ ImGuiNavMoveFlags_IsPageMove
@ ImGuiNavMoveFlags_AlsoScoreVisibleSet
@ ImGuiNavMoveFlags_IsTabbing
@ ImGuiNavMoveFlags_AllowCurrentNavId
@ ImGuiNavMoveFlags_DebugNoResult
@ ImGuiNavMoveFlags_WrapX
@ ImGuiNavMoveFlags_NoSelect
@ ImGuiNavMoveFlags_LoopY
@ ImGuiNavMoveFlags_ScrollToEdgeY
@ ImGuiNavMoveFlags_WrapMask_
@ ImGuiNavMoveFlags_LoopX
@ ImGuiNavMoveFlags_FocusApi
@ ImGuiNavMoveFlags_Activate
@ ImGuiNavMoveFlags_NoClearActiveId
@ ImGuiNavMoveFlags_NoSetNavCursorVisible
#define IMGUI_PAYLOAD_TYPE_WINDOW
#define DOCKING_HOST_DRAW_CHANNEL_BG
#define IMGUI_FONT_SIZE_MAX
#define ImGuiKey_NavGamepadTweakSlow
float ImTriangleArea(const ImVec2 &a, const ImVec2 &b, const ImVec2 &c)
@ ImGuiDataAuthority_Window
@ ImGuiDataAuthority_Auto
@ ImGuiDataAuthority_DockNode
#define IM_MSVC_WARNING_SUPPRESS(XXXX)
#define IMGUI_DEBUG_LOG_IO(...)
@ ImGuiNavRenderCursorFlags_NoRounding
@ ImGuiNavRenderCursorFlags_AlwaysDraw
@ ImGuiNavRenderCursorFlags_Compact
#define ImGuiKey_Gamepad_BEGIN
#define ImGuiKey_Keyboard_BEGIN
IMGUI_API ImGuiID ImHashData(const void *data, size_t data_size, ImGuiID seed=0)
#define IM_ASSERT_USER_ERROR(_EXPR, _MSG)
ImFontAtlasRectId ImFontAtlasRectId_Make(int index_idx, int gen_idx)
IMGUI_API void SetCursorPosY(float local_y)
IMGUI_API void AddDrawListToDrawDataEx(ImDrawData *draw_data, ImVector< ImDrawList * > *out_list, ImDrawList *draw_list)
IMGUI_API void ClosePopupsOverWindow(ImGuiWindow *ref_window, bool restore_focus_to_window_under_popup)
IMGUI_API void PushStyleVarY(ImGuiStyleVar idx, float val_y)
IMGUI_API int GetFrameCount()
IMGUI_API float GetCursorPosX()
IMGUI_API void EndDragDropSource()
IMGUI_API bool InputTextMultiline(const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(0, 0), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
IMGUI_API bool IsAnyItemHovered()
IMGUI_API bool BeginItemTooltip()
ImGuiWindow * GetCurrentWindowRead()
const char * LocalizeGetMsg(ImGuiLocKey key)
IMGUI_API ImGuiID DockBuilderSplitNode(ImGuiID node_id, ImGuiDir split_dir, float size_ratio_for_node_at_dir, ImGuiID *out_id_at_dir, ImGuiID *out_id_at_opposite_dir)
ImGuiKeyOwnerData * GetKeyOwnerData(ImGuiContext *ctx, ImGuiKey key)
IMGUI_API void RegisterUserTexture(ImTextureData *tex)
IMGUI_API void EndGroup()
IMGUI_API bool BeginTooltip()
ImRect WindowRectAbsToRel(ImGuiWindow *window, const ImRect &r)
IMGUI_API void ColorConvertHSVtoRGB(float h, float s, float v, float &out_r, float &out_g, float &out_b)
IMGUI_API void SetScrollX(float scroll_x)
IMGUI_API void PopTextWrapPos()
IMGUI_API bool IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay)
IMGUI_API ImVec2 GetContentRegionMax()
static void DockNodeWindowMenuUpdate(ImGuiDockNode *node, ImGuiTabBar *tab_bar)
IMGUI_API void ShowFontSelector(const char *label)
IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup)
IMGUI_API void TableHeadersRow()
IMGUI_API bool ItemAdd(const ImRect &bb, ImGuiID id, const ImRect *nav_bb=NULL, ImGuiItemFlags extra_flags=0)
IMGUI_API ImVec2 ScrollToRectEx(ImGuiWindow *window, const ImRect &rect, ImGuiScrollFlags flags=0)
IMGUI_API bool IsAnyMouseDown()
IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul=1.0f)
IMGUI_API bool IsPopupOpen(const char *str_id, ImGuiPopupFlags flags=0)
IMGUI_API bool IsItemVisible()
IMGUI_API void RemoveSettingsHandler(const char *type_name)
IMGUI_API bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold=-1.0f)
IMGUI_API void DebugNodeWindowsListByBeginStackParent(ImGuiWindow **windows, int windows_size, ImGuiWindow *parent_in_begin_stack)
static void NavSaveLastChildNavWindowIntoParent(ImGuiWindow *nav_window)
IMGUI_API void SetNavID(ImGuiID id, ImGuiNavLayer nav_layer, ImGuiID focus_scope_id, const ImRect &rect_rel)
IMGUI_API ImGuiID GetItemID()
IMGUI_API void TextV(const char *fmt, va_list args) IM_FMTLIST(1)
ImRect WindowRectRelToAbs(ImGuiWindow *window, const ImRect &r)
IMGUI_API bool BeginPopup(const char *str_id, ImGuiWindowFlags flags=0)
IMGUI_API const char * GetClipboardText()
IMGUI_API bool IsItemClicked(ImGuiMouseButton mouse_button=0)
IMGUI_API void PushClipRect(const ImVec2 &clip_rect_min, const ImVec2 &clip_rect_max, bool intersect_with_current_clip_rect)
IMGUI_API void SetWindowFontScale(float scale)
IMGUI_API void SetNextItemWidth(float item_width)
static void DockNodeUpdateFlagsAndCollapse(ImGuiDockNode *node)
IMGUI_API void DebugRenderKeyboardPreview(ImDrawList *draw_list)
IMGUI_API void PopStyleVar(int count=1)
IMGUI_API void SeparatorTextEx(ImGuiID id, const char *label, const char *label_end, float extra_width)
IMGUI_API void ActivateItemByID(ImGuiID id)
IMGUI_API void SetNextWindowSizeConstraints(const ImVec2 &size_min, const ImVec2 &size_max, ImGuiSizeCallback custom_callback=NULL, void *custom_callback_data=NULL)
IMGUI_API void NavClearPreferredPosForAxis(ImGuiAxis axis)
static void DockSettingsHandler_ReadLine(ImGuiContext *, ImGuiSettingsHandler *, void *entry, const char *line)
IMGUI_API ImFontBaked * GetFontBaked()
IMGUI_API void BeginDockableDragDropTarget(ImGuiWindow *window)
IMGUI_API const ImGuiPayload * GetDragDropPayload()
IMGUI_API void ClearActiveID()
IMGUI_API ImGuiWindowSettings * FindWindowSettingsByID(ImGuiID id)
IMGUI_API bool BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags)
IMGUI_API void Separator()
IMGUI_API ImGuiWindow * FindBlockingModal(ImGuiWindow *window)
IMGUI_API ImGuiMultiSelectIO * EndMultiSelect()
IMGUI_API ImGuiViewport * FindViewportByID(ImGuiID id)
IMGUI_API void DebugNodeTypingSelectState(ImGuiTypingSelectState *state)
IMGUI_API void Initialize()
IMGUI_API void GetTypematicRepeatRate(ImGuiInputFlags flags, float *repeat_delay, float *repeat_rate)
IMGUI_API const char * GetKeyName(ImGuiKey key)
IMGUI_API bool ItemHoverable(const ImRect &bb, ImGuiID id, ImGuiItemFlags item_flags)
static bool DockNodeIsDropAllowed(ImGuiWindow *host_window, ImGuiWindow *payload_window)
bool IsNamedKey(ImGuiKey key)
IMGUI_API ImGuiID AddContextHook(ImGuiContext *context, const ImGuiContextHook *hook)
IMGUI_API void Image(ImTextureRef tex_ref, const ImVec2 &image_size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1))
float GetRoundedFontSize(float size)
IMGUI_API void BringWindowToDisplayFront(ImGuiWindow *window)
static void WindowSelectViewport(ImGuiWindow *window)
IMGUI_API bool CollapseButton(ImGuiID id, const ImVec2 &pos, ImGuiDockNode *dock_node)
bool IsKeyboardKey(ImGuiKey key)
IMGUI_API void RegisterFontAtlas(ImFontAtlas *atlas)
IMGUI_API void UnregisterUserTexture(ImTextureData *tex)
IMGUI_API bool TreeNodeEx(const char *label, ImGuiTreeNodeFlags flags=0)
IMGUI_API ImGuiID GetWindowResizeCornerID(ImGuiWindow *window, int n)
static bool UpdateTryMergeWindowIntoHostViewports(ImGuiWindow *window)
IMGUI_API bool IsMousePosValid(const ImVec2 *mouse_pos=NULL)
IMGUI_API ImVec2 GetMouseDragDelta(ImGuiMouseButton button=0, float lock_threshold=-1.0f)
IMGUI_API void RenderDragDropTargetRect(const ImRect &bb, const ImRect &item_clip_rect)
static void DockContextQueueNotifyRemovedNode(ImGuiContext *ctx, ImGuiDockNode *node)
IMGUI_API void EndFrame()
IMGUI_API void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList *out_draw_list, const ImDrawList *draw_list, const ImDrawCmd *draw_cmd, bool show_mesh, bool show_aabb)
IMGUI_API void DockContextEndFrame(ImGuiContext *ctx)
ImGuiKey MouseButtonToKey(ImGuiMouseButton button)
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags)
IMGUI_API void UnregisterFontAtlas(ImFontAtlas *atlas)
static void DockContextProcessDock(ImGuiContext *ctx, ImGuiDockRequest *req)
IMGUI_API const char * GetStyleColorName(ImGuiCol idx)
IMGUI_API void DebugNodeTexture(ImTextureData *tex, int int_id, const ImFontAtlasRect *highlight_rect=NULL)
IMGUI_API void MemFree(void *ptr)
IMGUI_API void BeginDisabledOverrideReenable()
IMGUI_API void StyleColorsDark(ImGuiStyle *dst=NULL)
IMGUI_API const char * SaveIniSettingsToMemory(size_t *out_ini_size=NULL)
IMGUI_API void RenderNavCursor(const ImRect &bb, ImGuiID id, ImGuiNavRenderCursorFlags flags=ImGuiNavRenderCursorFlags_None)
IMGUI_API void PushID(const char *str_id)
IMGUI_API void FocusWindow(ImGuiWindow *window, ImGuiFocusRequestFlags flags=0)
static const char * DockNodeGetHostWindowTitle(ImGuiDockNode *node, char *buf, int buf_size)
IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow *window)
static void DockNodeTreeUpdatePosSize(ImGuiDockNode *node, ImVec2 pos, ImVec2 size, ImGuiDockNode *only_write_to_single_node=NULL)
IMGUI_API bool SplitterBehavior(const ImRect &bb, ImGuiID id, ImGuiAxis axis, float *size1, float *size2, float min_size1, float min_size2, float hover_extend=0.0f, float hover_visibility_delay=0.0f, ImU32 bg_col=0)
IMGUI_API void SetCurrentContext(ImGuiContext *ctx)
IMGUI_API ImGuiID DockSpaceOverViewport(ImGuiID dockspace_id=0, const ImGuiViewport *viewport=NULL, ImGuiDockNodeFlags flags=0, const ImGuiWindowClass *window_class=NULL)
IMGUI_API bool BeginPopupMenuEx(ImGuiID id, const char *label, ImGuiWindowFlags extra_window_flags)
IMGUI_API void SetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow *window)
IMGUI_API ImDrawListSharedData * GetDrawListSharedData()
IMGUI_API bool IsWindowCollapsed()
IMGUI_API bool BeginTooltipHidden()
IMGUI_API bool TextLinkOpenURL(const char *label, const char *url=NULL)
IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button)
static void NavUpdateAnyRequestFlag()
IMGUI_API bool TestShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id)
IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, bool repeat=false)
IMGUI_API bool IsItemActive()
IMGUI_API void SetNavCursorVisible(bool visible)
ImVec2 WindowPosAbsToRel(ImGuiWindow *window, const ImVec2 &p)
IMGUI_API void LogFinish()
IMGUI_API ImGuiWindowSettings * CreateNewWindowSettings(const char *name)
IMGUI_API bool IsItemToggledOpen()
IMGUI_API const ImGuiPlatformMonitor * GetViewportPlatformMonitor(ImGuiViewport *viewport)
IMGUI_API ImVec2 GetCursorPos()
IMGUI_API void EndErrorTooltip()
IMGUI_API ImVec2 GetFontTexUvWhitePixel()
IMGUI_API void TreePush(const char *str_id)
IMGUI_API ImVec2 FindBestWindowPosForPopup(ImGuiWindow *window)
IMGUI_API void SetTooltip(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API ImGuiIO & GetIO()
IMGUI_API void SetScrollHereX(float center_x_ratio=0.5f)
IMGUI_API void DebugTextEncoding(const char *text)
IMGUI_API void SetItemAllowOverlap()
IMGUI_API ImVec2 GetItemRectSize()
IMGUI_API ImGuiID GetID(const char *str_id)
IMGUI_API void TabBarRemoveTab(ImGuiTabBar *tab_bar, ImGuiID tab_id)
IMGUI_API void EndDisabledOverrideReenable()
static void ItemHandleShortcut(ImGuiID id)
IMGUI_API void ImageWithBg(ImTextureRef tex_ref, const ImVec2 &image_size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &bg_col=ImVec4(0, 0, 0, 0), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1))
IMGUI_API void TranslateWindowsInViewport(ImGuiViewportP *viewport, const ImVec2 &old_pos, const ImVec2 &new_pos, const ImVec2 &old_size, const ImVec2 &new_size)
IMGUI_API void BringWindowToDisplayBack(ImGuiWindow *window)
IMGUI_API void SetNextWindowScroll(const ImVec2 &scroll)
IMGUI_API void RenderRectFilledWithHole(ImDrawList *draw_list, const ImRect &outer, const ImRect &inner, ImU32 col, float rounding)
IMGUI_API void SeparatorText(const char *label)
IMGUI_API void SetItemTooltip(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API void TextColored(const ImVec4 &col, const char *fmt,...) IM_FMTARGS(2)
static void UpdateFontsEndFrame()
IMGUI_API void SetItemDefaultFocus()
IMGUI_API void FindHoveredWindowEx(const ImVec2 &pos, bool find_first_and_in_any_viewport, ImGuiWindow **out_hovered_window, ImGuiWindow **out_hovered_window_under_moving_window)
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
IMGUI_API void DebugTextUnformattedWithLocateItem(const char *line_begin, const char *line_end)
IMGUI_API void OpenPopupOnItemClick(const char *str_id=NULL, ImGuiPopupFlags popup_flags=1)
IMGUI_API void SetTooltipV(const char *fmt, va_list args) IM_FMTLIST(1)
IMGUI_API const ImGuiStyleVarInfo * GetStyleVarInfo(ImGuiStyleVar idx)
IMGUI_API ImGuiID GetKeyOwner(ImGuiKey key)
bool DockNodeIsInHierarchyOf(ImGuiDockNode *node, ImGuiDockNode *parent)
IMGUI_API void DockContextInitialize(ImGuiContext *ctx)
IMGUI_API ImGuiMouseCursor GetMouseCursor()
IMGUI_API void UpdateMouseMovingWindowNewFrame()
IMGUI_API float GetScrollY()
IMGUI_API ImVec2 GetItemRectMax()
static void DockNodeCalcTabBarLayout(const ImGuiDockNode *node, ImRect *out_title_rect, ImRect *out_tab_bar_rect, ImVec2 *out_window_menu_button_pos, ImVec2 *out_close_button_pos)
IMGUI_API ImGuiID DockSpace(ImGuiID dockspace_id, const ImVec2 &size=ImVec2(0, 0), ImGuiDockNodeFlags flags=0, const ImGuiWindowClass *window_class=NULL)
IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond=0)
IMGUI_API void NavHighlightActivated(ImGuiID id)
IMGUI_API ImGuiPlatformIO & GetPlatformIO()
static void RenderWindowTitleBarContents(ImGuiWindow *window, const ImRect &title_bar_rect, const char *name, bool *p_open)
IMGUI_API bool ErrorLog(const char *msg)
static bool NavScoreItem(ImGuiNavItemData *result)
IMGUI_API double GetTime()
IMGUI_API bool NavMoveRequestButNoResultYet()
IMGUI_API void DockContextNewFrameUpdateDocking(ImGuiContext *ctx)
static ImVec2 NavCalcPreferredRefPos()
static ImGuiDockNode * DockNodeTreeFindFallbackLeafNode(ImGuiDockNode *node)
IMGUI_API ImVec2 GetContentRegionAvail()
IMGUI_API ImVec2 GetWindowPos()
static void UpdateViewportPlatformMonitor(ImGuiViewportP *viewport)
IMGUI_API void SetScrollY(float scroll_y)
IMGUI_API void BeginGroup()
static void DockNodeUpdateVisibleFlag(ImGuiDockNode *node)
IMGUI_API void NavMoveRequestCancel()
IMGUI_API ImFont * GetFont()
IMGUI_API bool BeginPopupContextItem(const char *str_id=NULL, ImGuiPopupFlags popup_flags=1)
IMGUI_API ImGuiKeyRoutingData * GetShortcutRoutingData(ImGuiKeyChord key_chord)
IMGUI_API float GetWindowHeight()
static void UpdateMouseWheel()
IMGUI_API bool SetDragDropPayload(const char *type, const void *data, size_t sz, ImGuiCond cond=0)
IMGUI_API void RenderBullet(ImDrawList *draw_list, ImVec2 pos, ImU32 col)
IMGUI_API void DockNodeWindowMenuHandler_Default(ImGuiContext *ctx, ImGuiDockNode *node, ImGuiTabBar *tab_bar)
IMGUI_API const char * GetKeyChordName(ImGuiKeyChord key_chord)
IMGUI_API float GetWindowWidth()
IMGUI_API void DebugNodeTableSettings(ImGuiTableSettings *settings)
IMGUI_API bool IsKeyPressed(ImGuiKey key, bool repeat=true)
IMGUI_API int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate)
IMGUI_API bool IsWindowWithinBeginStackOf(ImGuiWindow *window, ImGuiWindow *potential_parent)
static void DockNodeUpdateForRootNode(ImGuiDockNode *node)
IMGUI_API void TableSettingsAddSettingsHandler()
IMGUI_API ImDrawList * GetBackgroundDrawList(ImGuiViewport *viewport=NULL)
static void DockNodeTreeUpdateSplitter(ImGuiDockNode *node)
IMGUI_API void SetNextItemOpen(bool is_open, ImGuiCond cond=0)
IMGUI_API void TableSetupColumn(const char *label, ImGuiTableColumnFlags flags=0, float init_width_or_weight=0.0f, ImGuiID user_id=0)
IMGUI_API void PushItemWidth(float item_width)
static void NavUpdateCreateTabbingRequest()
static void DockNodeUpdateTabBar(ImGuiDockNode *node, ImGuiWindow *host_window)
IMGUI_API void ItemSize(const ImVec2 &size, float text_baseline_y=-1.0f)
IMGUI_API void LoadIniSettingsFromDisk(const char *ini_filename)
IMGUI_API void DebugNodeMultiSelectState(ImGuiMultiSelectState *state)
IMGUI_API void LogToBuffer(int auto_open_depth=-1)
IMGUI_API bool TreeNode(const char *label)
IMGUI_API bool TabItemEx(ImGuiTabBar *tab_bar, const char *label, bool *p_open, ImGuiTabItemFlags flags, ImGuiWindow *docked_window)
IMGUI_API void TableGcCompactSettings()
static int FindPlatformMonitorForRect(const ImRect &r)
static void RenderWindowDecorations(ImGuiWindow *window, const ImRect &title_bar_rect, bool title_bar_is_highlight, bool handle_borders_and_resize_grips, int resize_grip_count, const ImU32 resize_grip_col[4], float resize_grip_draw_size)
IMGUI_API bool CloseButton(ImGuiID id, const ImVec2 &pos)
static void NavUpdateCancelRequest()
ImGuiKeyChord FixupKeyChord(ImGuiKeyChord key_chord)
IMGUI_API ImGuiContext * CreateContext(ImFontAtlas *shared_font_atlas=NULL)
static void UpdateTexturesNewFrame()
IMGUI_API void SetCurrentViewport(ImGuiWindow *window, ImGuiViewportP *viewport)
IMGUI_API void NavInitRequestApplyResult()
IMGUI_API void SetCursorPos(const ImVec2 &local_pos)
IMGUI_API bool IsWindowFocused(ImGuiFocusedFlags flags=0)
static void DockNodeUpdate(ImGuiDockNode *node)
IMGUI_API ImGuiDockNode * DockContextFindNodeByID(ImGuiContext *ctx, ImGuiID id)
IMGUI_API ImGuiViewport * FindViewportByPlatformHandle(void *platform_handle)
IMGUI_API void DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void *data_id, const void *data_id_end)
IMGUI_API void Scrollbar(ImGuiAxis axis)
static void UpdateDebugToolFlashStyleColor()
static void UpdateTexturesEndFrame()
IMGUI_API void SetNavCursorVisibleAfterMove()
IMGUI_API bool IsItemActivated()
IMGUI_API bool IsRectVisible(const ImVec2 &size)
IMGUI_API bool Checkbox(const char *label, bool *v)
IMGUI_API bool SliderInt(const char *label, int *v, int v_min, int v_max, const char *format="%d", ImGuiSliderFlags flags=0)
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
static void DockSettingsHandler_ApplyAll(ImGuiContext *, ImGuiSettingsHandler *)
IMGUI_API bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags=0)
IMGUI_API const char * TabBarGetTabName(ImGuiTabBar *tab_bar, ImGuiTabItem *tab)
static void NavEndFrame()
IMGUI_API bool SmallButton(const char *label)
IMGUI_API void SetStateStorage(ImGuiStorage *storage)
IMGUI_API void NavUpdateCurrentWindowIsScrollPushableX()
IMGUI_API const ImGuiPayload * AcceptDragDropPayload(const char *type, ImGuiDragDropFlags flags=0)
IMGUI_API ImGuiTabItem * TabBarFindMostRecentlySelectedTabForActiveWindow(ImGuiTabBar *tab_bar)
IMGUI_API void SetActiveIdUsingAllKeyboardKeys()
IMGUI_API bool DockNodeBeginAmendTabBar(ImGuiDockNode *node)
IMGUI_API void DebugLocateItem(ImGuiID target_id)
static void NavRestoreLayer(ImGuiNavLayer layer)
static void NavUpdateWindowingOverlay()
static void UpdateDebugToolStackQueries()
IMGUI_API void CallContextHooks(ImGuiContext *context, ImGuiContextHookType type)
IMGUI_API void BeginDocked(ImGuiWindow *window, bool *p_open)
static void DockSettingsRenameNodeReferences(ImGuiID old_node_id, ImGuiID new_node_id)
IMGUI_API void ClosePopupsExceptModals()
IMGUI_API void SetCursorScreenPos(const ImVec2 &pos)
IMGUI_API void EndCombo()
static void DockContextBuildAddWindowsToNodes(ImGuiContext *ctx, ImGuiID root_id)
IMGUI_API const char * GetVersion()
IMGUI_API void DockContextShutdown(ImGuiContext *ctx)
IMGUI_API bool IsItemEdited()
IMGUI_API void SetWindowSize(const ImVec2 &size, ImGuiCond cond=0)
IMGUI_API bool ButtonBehavior(const ImRect &bb, ImGuiID id, bool *out_hovered, bool *out_held, ImGuiButtonFlags flags=0)
IMGUI_API ImVec2 GetItemRectMin()
int DockNodeGetDepth(const ImGuiDockNode *node)
IMGUI_API void PopFocusScope()
IMGUI_API float CalcWrapWidthForPos(const ImVec2 &pos, float wrap_pos_x)
IMGUI_API void ScaleWindowsInViewport(ImGuiViewportP *viewport, float scale)
IMGUI_API void LogSetNextTextDecoration(const char *prefix, const char *suffix)
IMGUI_API void SetScrollFromPosY(float local_y, float center_y_ratio=0.5f)
static void NavUpdateCreateWrappingRequest()
IMGUI_API bool IsDragDropPayloadBeingAccepted()
IMGUI_API bool BeginPopupContextVoid(const char *str_id=NULL, ImGuiPopupFlags popup_flags=1)
IMGUI_API void LocalizeRegisterEntries(const ImGuiLocEntry *entries, int count)
IMGUI_API void DockContextRebuildNodes(ImGuiContext *ctx)
IMGUI_API void TabBarQueueFocus(ImGuiTabBar *tab_bar, ImGuiTabItem *tab)
IMGUI_API void DebugNodeColumns(ImGuiOldColumns *columns)
IMGUI_API void DebugNodePlatformMonitor(ImGuiPlatformMonitor *monitor, const char *label, int idx)
static void DockContextRemoveNode(ImGuiContext *ctx, ImGuiDockNode *node, bool merge_sibling_into_parent_node)
static void NavProcessItemForTabbingRequest(ImGuiID id, ImGuiItemFlags item_flags, ImGuiNavMoveFlags move_flags)
IMGUI_API void RenderPlatformWindowsDefault(void *platform_render_arg=NULL, void *renderer_render_arg=NULL)
static void RenderDimmedBackgrounds()
IMGUI_API bool RadioButton(const char *label, bool active)
IMGUI_API ImGuiWindow * GetTopMostPopupModal()
IMGUI_API void TableEndRow(ImGuiTable *table)
IMGUI_API void Indent(float indent_w=0.0f)
IMGUI_API ImGuiKeyData * GetKeyData(ImGuiContext *ctx, ImGuiKey key)
static void DockContextBuildNodesFromSettings(ImGuiContext *ctx, ImGuiDockNodeSettings *node_settings_array, int node_settings_count)
IMGUI_API bool BeginPopupModal(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
IMGUI_API bool IsWindowNavFocusable(ImGuiWindow *window)
IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool borders=true, float rounding=0.0f)
IMGUI_API void PushMultiItemsWidths(int components, float width_full)
IMGUI_API void DebugBreakButtonTooltip(bool keyboard_only, const char *description_of_location)
IMGUI_API void UpdateMouseMovingWindowEndFrame()
IMGUI_API float GetScrollX()
static void * DockSettingsHandler_ReadOpen(ImGuiContext *, ImGuiSettingsHandler *, const char *name)
IMGUI_API ImGuiViewportP * FindHoveredViewportFromPlatformWindowStack(const ImVec2 &mouse_platform_pos)
static void RenderWindowOuterBorders(ImGuiWindow *window)
IMGUI_API void RenderTextClippedEx(ImDrawList *draw_list, const ImVec2 &pos_min, const ImVec2 &pos_max, const char *text, const char *text_end, const ImVec2 *text_size_if_known, const ImVec2 &align=ImVec2(0, 0), const ImRect *clip_rect=NULL)
IMGUI_API void LogToClipboard(int auto_open_depth=-1)
static void DockSettingsHandler_ClearAll(ImGuiContext *, ImGuiSettingsHandler *)
IMGUI_API ImRect GetPopupAllowedExtentRect(ImGuiWindow *window)
IMGUI_API void PushTextWrapPos(float wrap_local_pos_x=0.0f)
IMGUI_API ImVec4 ColorConvertU32ToFloat4(ImU32 in)
static void DockSettingsRemoveNodeReferences(ImGuiID *node_ids, int node_ids_count)
IMGUI_API const char * FindRenderedTextEnd(const char *text, const char *text_end=NULL)
IMGUI_API void DebugLocateItemOnHover(ImGuiID target_id)
static void DockNodeRemoveWindow(ImGuiDockNode *node, ImGuiWindow *window, ImGuiID save_dock_id)
IMGUI_API void ResetMouseDragDelta(ImGuiMouseButton button=0)
IMGUI_API void SetItemTooltipV(const char *fmt, va_list args) IM_FMTLIST(1)
IMGUI_API ImDrawList * GetForegroundDrawList(ImGuiViewport *viewport=NULL)
IMGUI_API void PushStyleColor(ImGuiCol idx, ImU32 col)
IMGUI_API void RenderTextEllipsis(ImDrawList *draw_list, const ImVec2 &pos_min, const ImVec2 &pos_max, float ellipsis_max_x, const char *text, const char *text_end, const ImVec2 *text_size_if_known)
IMGUI_API ImVec2 GetWindowContentRegionMin()
static void SetLastItemDataForChildWindowItem(ImGuiWindow *window, const ImRect &rect)
IMGUI_API void LogRenderedText(const ImVec2 *ref_pos, const char *text, const char *text_end=NULL)
IMGUI_API void BeginDockableDragDropSource(ImGuiWindow *window)
IMGUI_API bool BeginTable(const char *str_id, int columns, ImGuiTableFlags flags=0, const ImVec2 &outer_size=ImVec2(0.0f, 0.0f), float inner_width=0.0f)
IMGUI_API void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond=0)
static void DockNodeMoveChildNodes(ImGuiDockNode *dst_node, ImGuiDockNode *src_node)
IMGUI_API void LogButtons()
static int DockNodeGetTabOrder(ImGuiWindow *window)
IMGUI_API ImVec2 GetKeyMagnitude2d(ImGuiKey key_left, ImGuiKey key_right, ImGuiKey key_up, ImGuiKey key_down)
IMGUI_API ImGuiViewport * GetMainViewport()
IMGUI_API bool IsClippedEx(const ImRect &bb, ImGuiID id)
IMGUI_API void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func, void *user_data=NULL)
bool IsMouseKey(ImGuiKey key)
IMGUI_API void SetNextWindowBgAlpha(float alpha)
static void DockNodePreviewDockRender(ImGuiWindow *host_window, ImGuiDockNode *host_node, ImGuiWindow *payload_window, const ImGuiDockPreviewData *preview_data)
IMGUI_API void DockContextNewFrameUpdateUndocking(ImGuiContext *ctx)
static bool UpdateTryMergeWindowIntoHostViewport(ImGuiWindow *window, ImGuiViewportP *host_viewport)
IMGUI_API float GetColumnOffsetFromNorm(const ImGuiOldColumns *columns, float offset_norm)
IMGUI_API bool IsKeyDown(ImGuiKey key)
static void NavUpdateCreateMoveRequest()
IMGUI_API ImGuiWindow * FindWindowByID(ImGuiID id)
IMGUI_API void MarkItemEdited(ImGuiID id)
IMGUI_API ImFont * GetDefaultFont()
IMGUI_API void GcCompactTransientWindowBuffers(ImGuiWindow *window)
IMGUI_API void SetWindowHitTestHole(ImGuiWindow *window, const ImVec2 &pos, const ImVec2 &size)
IMGUI_API void ClearIniSettings()
IMGUI_API ImVec2 CalcTextSize(const char *text, const char *text_end=NULL, bool hide_text_after_double_hash=false, float wrap_width=-1.0f)
static ImGuiDockNode * DockNodeTreeFindVisibleNodeByPos(ImGuiDockNode *node, ImVec2 pos)
IMGUI_API void ErrorCheckEndFrameFinalizeErrorTooltip()
IMGUI_API void GetAllocatorFunctions(ImGuiMemAllocFunc *p_alloc_func, ImGuiMemFreeFunc *p_free_func, void **p_user_data)
IMGUI_API void KeepAliveID(ImGuiID id)
IMGUI_API void UpdateWindowParentAndRootLinks(ImGuiWindow *window, ImGuiWindowFlags flags, ImGuiWindow *parent_window)
IMGUI_API void DebugNodeDockNode(ImGuiDockNode *node, const char *label)
static int FindWindowFocusIndex(ImGuiWindow *window)
IMGUI_API void EndTabBar()
IMGUI_API float GetCursorPosY()
bool IsLegacyKey(ImGuiKey key)
IMGUI_API bool IsItemToggledSelection()
IMGUI_API void NavMoveRequestApplyResult()
IMGUI_API void TabItemBackground(ImDrawList *draw_list, const ImRect &bb, ImGuiTabItemFlags flags, ImU32 col)
IMGUI_API ImGuiTabItem * TabBarFindTabByID(ImGuiTabBar *tab_bar, ImGuiID tab_id)
IMGUI_API bool IsAnyItemFocused()
IMGUI_API ImGuiViewport * GetWindowViewport()
IMGUI_API void SetFocusID(ImGuiID id, ImGuiWindow *window)
IMGUI_API void Dummy(const ImVec2 &size)
IMGUI_API bool IsItemDeactivatedAfterEdit()
static void UpdateSettings()
IMGUI_API void DebugNodeWindowsList(ImVector< ImGuiWindow * > *windows, const char *label)
IMGUI_API void DockContextProcessUndockWindow(ImGuiContext *ctx, ImGuiWindow *window, bool clear_persistent_docking_ref=true)
IMGUI_API void BringWindowToDisplayBehind(ImGuiWindow *window, ImGuiWindow *above_window)
IMGUI_API void DockBuilderDockWindow(const char *window_name, ImGuiID node_id)
IMGUI_API float GetFrameHeightWithSpacing()
IMGUI_API void DebugNodeStorage(ImGuiStorage *storage, const char *label)
IMGUI_API void LoadIniSettingsFromMemory(const char *ini_data, size_t ini_size=0)
IMGUI_API ImGuiID GetWindowDockID()
IMGUI_API ImVec2 GetCursorStartPos()
static void DockNodeMoveWindows(ImGuiDockNode *dst_node, ImGuiDockNode *src_node)
IMGUI_API void LogToFile(int auto_open_depth=-1, const char *filename=NULL)
bool IsActiveIdUsingNavDir(ImGuiDir dir)
static void UpdateFontsNewFrame()
IMGUI_API bool BeginDragDropTargetCustom(const ImRect &bb, ImGuiID id)
static void RenderDimmedBackgroundBehindWindow(ImGuiWindow *window, ImU32 col)
IMGUI_API void DockBuilderCopyNode(ImGuiID src_node_id, ImGuiID dst_node_id, ImVector< ImGuiID > *out_node_remap_pairs)
IMGUI_API ImGuiID DockBuilderAddNode(ImGuiID node_id=0, ImGuiDockNodeFlags flags=0)
IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow *window, ImGuiNavMoveFlags move_flags)
IMGUI_API void DockNodeEndAmendTabBar()
IMGUI_API void TextUnformatted(const char *text, const char *text_end=NULL)
IMGUI_API ImVec2 GetWindowContentRegionMax()
static void DockNodeTreeMerge(ImGuiContext *ctx, ImGuiDockNode *parent_node, ImGuiDockNode *merge_lead_child)
IMGUI_API void PopStyleColor(int count=1)
IMGUI_API void ScrollToRect(ImGuiWindow *window, const ImRect &rect, ImGuiScrollFlags flags=0)
IMGUI_API float GetWindowDpiScale()
IMGUI_API ImDrawFlags CalcRoundingFlagsForRectInRect(const ImRect &r_in, const ImRect &r_outer, float threshold)
IMGUI_API void LogTextV(const char *fmt, va_list args) IM_FMTLIST(1)
IMGUI_API void RenderText(ImVec2 pos, const char *text, const char *text_end=NULL, bool hide_text_after_hash=true)
IMGUI_API bool IsWindowAppearing()
IMGUI_API bool IsWindowChildOf(ImGuiWindow *window, ImGuiWindow *potential_parent, bool popup_hierarchy, bool dock_hierarchy)
static void UpdateWindowInFocusOrderList(ImGuiWindow *window, bool just_created, ImGuiWindowFlags new_flags)
IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_window_flags)
IMGUI_API void EndTable()
static void DockNodeAddWindow(ImGuiDockNode *node, ImGuiWindow *window, bool add_to_tab_bar)
IMGUI_API void ErrorRecoveryTryToRecoverWindowState(const ImGuiErrorRecoveryState *state_in)
IMGUI_API void OpenPopup(const char *str_id, ImGuiPopupFlags popup_flags=0)
IMGUI_API void EndDisabled()
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API bool DebugCheckVersionAndDataLayout(const char *version_str, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_drawvert, size_t sz_drawidx)
IMGUI_API ImDrawList * GetWindowDrawList()
static void WindowSyncOwnedViewport(ImGuiWindow *window, ImGuiWindow *parent_window_in_stack)
IMGUI_API float GetTextLineHeightWithSpacing()
IMGUI_API bool MenuItem(const char *label, const char *shortcut=NULL, bool selected=false, bool enabled=true)
static void NavProcessItem()
IMGUI_API void EndMenuBar()
IMGUI_API bool Combo(const char *label, int *current_item, const char *const items[], int items_count, int popup_max_height_in_items=-1)
IMGUI_API ImGuiStorage * GetStateStorage()
IMGUI_API void StartMouseMovingWindowOrNode(ImGuiWindow *window, ImGuiDockNode *node, bool undock)
IMGUI_API ImVec2 CalcWindowNextAutoFitSize(ImGuiWindow *window)
IMGUI_API ImGuiWindowSettings * FindWindowSettingsByWindow(ImGuiWindow *window)
IMGUI_API void SetItemKeyOwner(ImGuiKey key)
IMGUI_API void SetNavWindow(ImGuiWindow *window)
IMGUI_API void SetClipboardText(const char *text)
IMGUI_API void RenderTextWrapped(ImVec2 pos, const char *text, const char *text_end, float wrap_width)
IMGUI_API void DockContextQueueDock(ImGuiContext *ctx, ImGuiWindow *target, ImGuiDockNode *target_node, ImGuiWindow *payload, ImGuiDir split_dir, float split_ratio, bool split_outer)
IMGUI_API void UpdateCurrentFontSize(float restore_font_size_after_scaling)
IMGUI_API void LogText(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API void DebugNodeViewport(ImGuiViewportP *viewport)
static void DockNodeStartMouseMovingWindow(ImGuiDockNode *node, ImGuiWindow *window)
IMGUI_API void EndPopup()
IMGUI_API ImVec2 TabItemCalcSize(const char *label, bool has_close_button_or_unsaved_marker)
static void DestroyViewport(ImGuiViewportP *viewport)
IMGUI_API bool InputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
const ImGuiID IMGUI_VIEWPORT_DEFAULT_ID
IMGUI_API ImGuiWindow * GetTopMostAndVisiblePopupModal()
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
IMGUI_API void PopItemFlag()
IMGUI_API void TextDisabled(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API void FocusTopMostWindowUnderOne(ImGuiWindow *under_this_window, ImGuiWindow *ignore_window, ImGuiViewport *filter_viewport, ImGuiFocusRequestFlags flags)
IMGUI_API ImVec2 GetWindowSize()
IMGUI_API void DebugLog(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API void SetWindowPos(const ImVec2 &pos, ImGuiCond cond=0)
IMGUI_API void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags)
IMGUI_API void GcCompactTransientMiscBuffers()
IMGUI_API bool DragFloat(const char *label, float *v, float v_speed=1.0f, float v_min=0.0f, float v_max=0.0f, const char *format="%.3f", ImGuiSliderFlags flags=0)
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val)
IMGUI_API float GetTextLineHeight()
static void UpdateViewportsEndFrame()
IMGUI_API void RemoveContextHook(ImGuiContext *context, ImGuiID hook_to_remove)
IMGUI_API ImGuiDockNode * DockBuilderGetNode(ImGuiID node_id)
IMGUI_API void UpdateWindowSkipRefresh(ImGuiWindow *window)
IMGUI_API void InputTextDeactivateHook(ImGuiID id)
IMGUI_API void SetNextWindowContentSize(const ImVec2 &size)
static void DockNodeCalcSplitRects(ImVec2 &pos_old, ImVec2 &size_old, ImVec2 &pos_new, ImVec2 &size_new, ImGuiDir dir, ImVec2 size_new_desired)
IMGUI_API bool IsWindowHovered(ImGuiHoveredFlags flags=0)
IMGUI_API void ColorConvertRGBtoHSV(float r, float g, float b, float &out_h, float &out_s, float &out_v)
ImGuiTableInstanceData * TableGetInstanceData(ImGuiTable *table, int instance_no)
static void UpdateDebugToolItemPicker()
IMGUI_API void UpdateInputEvents(bool trickle_fast_inputs)
int TabBarGetTabOrder(ImGuiTabBar *tab_bar, ImGuiTabItem *tab)
static ImGuiDockNode * DockContextAddNode(ImGuiContext *ctx, ImGuiID id)
static void ErrorCheckNewFrameSanityChecks()
IMGUI_API bool IsWindowContentHoverable(ImGuiWindow *window, ImGuiHoveredFlags flags=0)
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
IMGUI_API float GetScrollMaxY()
IMGUI_API void RenderTextClipped(const ImVec2 &pos_min, const ImVec2 &pos_max, const char *text, const char *text_end, const ImVec2 *text_size_if_known, const ImVec2 &align=ImVec2(0, 0), const ImRect *clip_rect=NULL)
IMGUI_API float CalcItemWidth()
IMGUI_API ImGuiID GetIDWithSeed(const char *str_id_begin, const char *str_id_end, ImGuiID seed)
IMGUI_API bool IsKeyChordPressed(ImGuiKeyChord key_chord)
IMGUI_API void NewFrame()
IMGUI_API bool CheckboxFlags(const char *label, int *flags, int flags_value)
IMGUI_API ImVec2 FindBestWindowPosForPopupEx(const ImVec2 &ref_pos, const ImVec2 &size, ImGuiDir *last_dir, const ImRect &r_outer, const ImRect &r_avoid, ImGuiPopupPositionPolicy policy)
IMGUI_API void ShowIDStackToolWindow(bool *p_open=NULL)
ImGuiDockNode * DockNodeGetRootNode(ImGuiDockNode *node)
IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiCond cond=0)
IMGUI_API void DockContextQueueUndockWindow(ImGuiContext *ctx, ImGuiWindow *window)
IMGUI_API void DebugDrawLineExtents(ImU32 col=IM_COL32(255, 0, 0, 255))
bool IsLRModKey(ImGuiKey key)
IMGUI_API ImDrawData * GetDrawData()
IMGUI_API void DockBuilderRemoveNodeChildNodes(ImGuiID node_id)
IMGUI_API void ScrollToItem(ImGuiScrollFlags flags=0)
IMGUI_API void DebugNodeInputTextState(ImGuiInputTextState *state)
IMGUI_API void DestroyContext(ImGuiContext *ctx=NULL)
IMGUI_API int CalcTypematicRepeatAmount(float t0, float t1, float repeat_delay, float repeat_rate)
static void UpdateKeyboardInputs()
IMGUI_API void SetHoveredID(ImGuiID id)
IMGUI_API ImGuiStyle & GetStyle()
IMGUI_API void DebugStartItemPicker()
IMGUI_API void TabItemLabelAndCloseButton(ImDrawList *draw_list, const ImRect &bb, ImGuiTabItemFlags flags, ImVec2 frame_padding, const char *label, ImGuiID tab_id, ImGuiID close_button_id, bool is_contents_visible, bool *out_just_closed, bool *out_text_clipped)
IMGUI_API ImGuiWindow * FindWindowByName(const char *name)
IMGUI_API void DebugNodeFontGlyphesForSrcMask(ImFont *font, ImFontBaked *baked, int src_mask)
IMGUI_API ImU32 ColorConvertFloat4ToU32(const ImVec4 &in)
IMGUI_API void DockBuilderSetNodeSize(ImGuiID node_id, ImVec2 size)
IMGUI_API void SetLastItemData(ImGuiID item_id, ImGuiItemFlags item_flags, ImGuiItemStatusFlags status_flags, const ImRect &item_rect)
IMGUI_API ImVec2 GetMousePos()
IMGUI_API void SetWindowDock(ImGuiWindow *window, ImGuiID dock_id, ImGuiCond cond)
static float NavUpdatePageUpPageDown()
IMGUI_API bool IsWindowDocked()
IMGUI_API void SetCurrentFont(ImFont *font, float font_size_before_scaling, float font_size_after_scaling)
IMGUI_API void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags=ImGuiPopupFlags_None)
IMGUI_API void SetNextFrameWantCaptureKeyboard(bool want_capture_keyboard)
IMGUI_API ImVec2 GetMousePosOnOpeningCurrentPopup()
IMGUI_API bool BeginDragDropSource(ImGuiDragDropFlags flags=0)
IMGUI_API void SetNextWindowFocus()
IMGUI_API void TabBarCloseTab(ImGuiTabBar *tab_bar, ImGuiTabItem *tab)
IMGUI_API bool DebugBreakButton(const char *label, const char *description_of_location)
IMGUI_API bool BeginChildEx(const char *name, ImGuiID id, const ImVec2 &size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags)
IMGUI_API void SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags=0)
IMGUI_API bool BeginDragDropTarget()
ImGuiWindow * GetCurrentWindow()
IMGUI_API float GetFontSize()
IMGUI_API bool IsWindowAbove(ImGuiWindow *potential_above, ImGuiWindow *potential_below)
IMGUI_API void ClearWindowSettings(const char *name)
IMGUI_API void DebugNodeTabBar(ImGuiTabBar *tab_bar, const char *label)
static void DockNodeAddTabBar(ImGuiDockNode *node)
static void SetLastItemDataForWindow(ImGuiWindow *window, const ImRect &rect)
IMGUI_API void SetWindowFocus()
IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled)
IMGUI_API void SetScrollHereY(float center_y_ratio=0.5f)
IMGUI_API void EndTooltip()
bool IsAliasKey(ImGuiKey key)
IMGUI_API void SetNextWindowViewport(ImGuiID viewport_id)
IMGUI_API bool BeginErrorTooltip()
IMGUI_API void ErrorRecoveryStoreState(ImGuiErrorRecoveryState *state_out)
IMGUI_API bool TableNextColumn()
IMGUI_API bool IsItemHovered(ImGuiHoveredFlags flags=0)
IMGUI_API void SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags)
IMGUI_API void SetMouseCursor(ImGuiMouseCursor cursor_type)
IMGUI_API void ShowFontAtlas(ImFontAtlas *atlas)
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h)
IMGUI_API void DebugDrawCursorPos(ImU32 col=IM_COL32(255, 0, 0, 255))
IMGUI_API ImGuiWindow * FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow *window)
bool IsGamepadKey(ImGuiKey key)
IMGUI_API void DockBuilderSetNodePos(ImGuiID node_id, ImVec2 pos)
IMGUI_API int FindWindowDisplayIndex(ImGuiWindow *window)
static void UpdateMouseInputs()
IMGUI_API void LogBegin(ImGuiLogFlags flags, int auto_open_depth)
IMGUI_API bool IsAnyItemActive()
IMGUI_API void DebugDrawItemRect(ImU32 col=IM_COL32(255, 0, 0, 255))
IMGUI_API void DebugBreakClearData()
IMGUI_API void DestroyPlatformWindow(ImGuiViewportP *viewport)
IMGUI_API void PushStyleVarX(ImGuiStyleVar idx, float val_x)
static ImGuiDockNodeSettings * DockSettingsFindNodeSettings(ImGuiContext *ctx, ImGuiID node_id)
IMGUI_API void PushOverrideID(ImGuiID id)
static void NavUpdateWindowing()
static void DockNodeHideHostWindow(ImGuiDockNode *node)
static void DockNodeRemoveTabBar(ImGuiDockNode *node)
IMGUI_API void PushFocusScope(ImGuiID id)
IMGUI_API bool TestKeyOwner(ImGuiKey key, ImGuiID owner_id)
IMGUI_API ImGuiID DockContextGenNodeID(ImGuiContext *ctx)
IMGUI_API float GetNavTweakPressedAmount(ImGuiAxis axis)
IMGUI_API bool IsMouseDragPastThreshold(ImGuiMouseButton button, float lock_threshold=-1.0f)
static void DockNodeTreeSplit(ImGuiContext *ctx, ImGuiDockNode *parent_node, ImGuiAxis split_axis, int split_first_child, float split_ratio, ImGuiDockNode *new_node)
IMGUI_API void LogToTTY(int auto_open_depth=-1)
IMGUI_API void SetScrollFromPosX(float local_x, float center_x_ratio=0.5f)
static void DockNodePreviewDockSetup(ImGuiWindow *host_window, ImGuiDockNode *host_node, ImGuiWindow *payload_window, ImGuiDockNode *payload_node, ImGuiDockPreviewData *preview_data, bool is_explicit_target, bool is_outer_docking)
IMGUI_API void PopItemWidth()
IMGUI_API void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags=0)
IMGUI_API void FocusItem()
static void NavUpdateWindowingApplyFocus(ImGuiWindow *window)
static ImGuiWindow * DockNodeFindWindowByID(ImGuiDockNode *node, ImGuiID id)
IMGUI_API void TabBarAddTab(ImGuiTabBar *tab_bar, ImGuiTabItemFlags tab_flags, ImGuiWindow *window)
IMGUI_API void DockBuilderCopyWindowSettings(const char *src_name, const char *dst_name)
ImGuiKey ConvertSingleModFlagToKey(ImGuiKey key)
IMGUI_API void Unindent(float indent_w=0.0f)
IMGUI_API ImGuiID GetHoveredID()
IMGUI_API void TextWrapped(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API void DebugNodeFontGlyph(ImFont *font, const ImFontGlyph *glyph)
IMGUI_API void ErrorCheckUsingSetCursorPosToExtendParentBoundaries()
IMGUI_API void GcAwakeTransientWindowBuffers(ImGuiWindow *window)
IMGUI_API void NavMoveRequestResolveWithLastItem(ImGuiNavItemData *result)
IMGUI_API const ImVec4 & GetStyleColorVec4(ImGuiCol idx)
IMGUI_API void DebugNodeWindowSettings(ImGuiWindowSettings *settings)
bool IsNamedKeyOrMod(ImGuiKey key)
IMGUI_API ImGuiSettingsHandler * FindSettingsHandler(const char *type_name)
IMGUI_API void SetNavFocusScope(ImGuiID focus_scope_id)
IMGUI_API bool IsItemDeactivated()
static ImGuiDockNode * DockContextBindNodeToWindow(ImGuiContext *ctx, ImGuiWindow *window)
static ImGuiViewportP * AddUpdateViewport(ImGuiWindow *window, ImGuiID id, const ImVec2 &platform_pos, const ImVec2 &size, ImGuiViewportFlags flags)
IMGUI_API void SetWindowViewport(ImGuiWindow *window, ImGuiViewportP *viewport)
IMGUI_API void DockContextClearNodes(ImGuiContext *ctx, ImGuiID root_id, bool clear_settings_refs)
IMGUI_API void ClearDragDrop()
IMGUI_API bool IsDragDropActive()
IMGUI_API ImVec2 GetCursorScreenPos()
static void UpdateViewportsNewFrame()
static void DockContextPruneUnusedSettingsNodes(ImGuiContext *ctx)
IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding=0.0f)
IMGUI_API void DockBuilderRemoveNodeDockedWindows(ImGuiID node_id, bool clear_settings_refs=true)
IMGUI_API bool IsItemFocused()
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
IMGUI_API void RenderMouseCursor(ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow)
IMGUI_API void AddSettingsHandler(const ImGuiSettingsHandler *handler)
IMGUI_API void DockBuilderCopyDockSpace(ImGuiID src_dockspace_id, ImGuiID dst_dockspace_id, ImVector< const char * > *in_window_remap_pairs)
static bool DockNodeCalcDropRectsAndTestMousePos(const ImRect &parent, ImGuiDir dir, ImRect &out_draw, bool outer_docking, ImVec2 *test_mouse_pos)
IMGUI_API void DebugNodeFont(ImFont *font)
IMGUI_API bool IsMouseHoveringRect(const ImVec2 &r_min, const ImVec2 &r_max, bool clip=true)
IMGUI_API bool GetWindowAlwaysWantOwnTabBar(ImGuiWindow *window)
IMGUI_API void SetKeyOwnersForKeyChord(ImGuiKeyChord key, ImGuiID owner_id, ImGuiInputFlags flags=0)
static void DockSettingsHandler_WriteAll(ImGuiContext *imgui_ctx, ImGuiSettingsHandler *handler, ImGuiTextBuffer *buf)
IMGUI_API void NavInitWindow(ImGuiWindow *window, bool force_reinit)
static void UpdateKeyRoutingTable(ImGuiKeyRoutingTable *rt)
IMGUI_API void TeleportMousePos(const ImVec2 &pos)
IMGUI_API void SetFontRasterizerDensity(float rasterizer_density)
static int UpdateWindowManualResize(ImGuiWindow *window, const ImVec2 &size_auto_fit, int *border_hovered, int *border_held, int resize_grip_count, ImU32 resize_grip_col[4], const ImRect &visibility_rect)
IMGUI_API bool IsMouseReleased(ImGuiMouseButton button)
IMGUI_API float GetFrameHeight()
IMGUI_API bool SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiInputFlags flags, ImGuiID owner_id)
IMGUI_API void SetCursorPosX(float local_x)
IMGUI_API bool BeginTabBarEx(ImGuiTabBar *tab_bar, const ImRect &bb, ImGuiTabBarFlags flags)
IMGUI_API void NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData *result, const ImGuiTreeNodeStackData *tree_node_data)
IMGUI_API void EndDragDropTarget()
IMGUI_API void SetKeyboardFocusHere(int offset=0)
IMGUI_API void DebugLocateItemResolveWithLastItem()
IMGUI_API void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color, int column_n=-1)
IMGUI_API void BeginDisabled(bool disabled=true)
IMGUI_API void DebugNodeTable(ImGuiTable *table)
IMGUI_API void DockBuilderFinish(ImGuiID node_id)
static ImGuiWindow * NavRestoreLastChildNavWindow(ImGuiWindow *window)
IMGUI_API void CloseCurrentPopup()
IMGUI_API void Shutdown()
IMGUI_API bool BeginChild(const char *str_id, const ImVec2 &size=ImVec2(0, 0), ImGuiChildFlags child_flags=0, ImGuiWindowFlags window_flags=0)
IMGUI_API void DestroyPlatformWindows()
IMGUI_API void UpdatePlatformWindows()
IMGUI_API void SetNextItemAllowOverlap()
IMGUI_API ImGuiID GetWindowResizeBorderID(ImGuiWindow *window, ImGuiDir dir)
IMGUI_API bool IsMouseDown(ImGuiMouseButton button)
IMGUI_API void * MemAlloc(size_t size)
IMGUI_API void MarkIniSettingsDirty()
IMGUI_API void PopClipRect()
static int FindPlatformMonitorForPos(const ImVec2 &pos)
IMGUI_API bool BeginPopupContextWindow(const char *str_id=NULL, ImGuiPopupFlags popup_flags=1)
IMGUI_API void ErrorRecoveryTryToRecoverState(const ImGuiErrorRecoveryState *state_in)
IMGUI_API void ShowDebugLogWindow(bool *p_open=NULL)
IMGUI_API void DockBuilderRemoveNode(ImGuiID node_id)
IMGUI_API bool IsKeyReleased(ImGuiKey key)
IMGUI_API void TableGcCompactTransientBuffers(ImGuiTable *table)
IMGUI_API float GetScrollMaxX()
IMGUI_API void DockContextQueueUndockNode(ImGuiContext *ctx, ImGuiDockNode *node)
static void ErrorCheckEndFrameSanityChecks()
IMGUI_API ImGuiContext * GetCurrentContext()
IMGUI_API void DockContextProcessUndockNode(ImGuiContext *ctx, ImGuiDockNode *node)
IMGUI_API void UpdateHoveredWindowAndCaptureFlags(const ImVec2 &mouse_pos)
IMGUI_API void DebugNodeDrawList(ImGuiWindow *window, ImGuiViewportP *viewport, const ImDrawList *draw_list, const char *label)
static void DockNodeUpdateHasCentralNodeChild(ImGuiDockNode *node)
IMGUI_API void DebugRenderViewportThumbnail(ImDrawList *draw_list, ImGuiViewportP *viewport, const ImRect &bb)
IMGUI_API void DebugAllocHook(ImGuiDebugAllocInfo *info, int frame_count, void *ptr, size_t size)
static void DockNodeApplyPosSizeToWindows(ImGuiDockNode *node)
IMGUI_API void BulletText(const char *fmt,...) IM_FMTARGS(1)
IMGUI_API void EndChild()
IMGUI_API void PushFont(ImFont *font, float font_size_base_unscaled)
IMGUI_API void EndColumns()
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
IMGUI_API void DebugLogV(const char *fmt, va_list args) IM_FMTLIST(1)
IMGUI_API void SaveIniSettingsToDisk(const char *ini_filename)
IMGUI_API bool DockContextCalcDropPosForDocking(ImGuiWindow *target, ImGuiDockNode *target_node, ImGuiWindow *payload_window, ImGuiDockNode *payload_node, ImGuiDir split_dir, bool split_outer, ImVec2 *out_pos)
static ImGuiInputSource NavCalcPreferredRefPosSource()
IMGUI_API void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond=0, const ImVec2 &pivot=ImVec2(0, 0))
static void NavApplyItemToResult(ImGuiNavItemData *result)
IMGUI_API void DebugNodeWindow(ImGuiWindow *window, const char *label)
IMGUI_API void StartMouseMovingWindow(ImGuiWindow *window)
IMGUI_API void DebugFlashStyleColor(ImGuiCol idx)
static bool GetWindowAlwaysWantOwnViewport(ImGuiWindow *window)
IMGUI_API void TabBarQueueReorder(ImGuiTabBar *tab_bar, ImGuiTabItem *tab, int offset)
IMGUI_API void ShowMetricsWindow(bool *p_open=NULL)
IMGUI_API void SetNextWindowClass(const ImGuiWindowClass *window_class)
IMGUI_API void SetNextFrameWantCaptureMouse(bool want_capture_mouse)
IMGUI_API void BringWindowToFocusFront(ImGuiWindow *window)
IMGUI_API int GetMouseClickedCount(ImGuiMouseButton button)
int strcmp(const String &s1, const String &s2)
bool TestBit(int n) const
T * alloc_chunk(size_t sz)
T * ptr_from_offset(int off)
int offset_from_ptr(const T *p)
ImDrawCallback UserCallback
ImVector< ImDrawList * > * Layers[2]
ImVector< ImDrawList * > LayerData1
ImVector< ImTextureData * > * Textures
ImVector< ImDrawList * > CmdLists
ImGuiViewport * OwnerViewport
ImVector< ImVec2 > TempBuffer
float CurveTessellationTol
ImDrawListFlags InitialFlags
ImVec4 ClipRectFullscreen
void SetCircleTessellationMaxError(float max_error)
IMGUI_API void PushClipRectFullScreen()
IMGUI_API void _SetTexture(ImTextureRef tex_ref)
ImDrawListSplitter _Splitter
IMGUI_API void _PopUnusedDrawCmd()
IMGUI_API void AddImage(ImTextureRef tex_ref, const ImVec2 &p_min, const ImVec2 &p_max, const ImVec2 &uv_min=ImVec2(0, 0), const ImVec2 &uv_max=ImVec2(1, 1), ImU32 col=IM_COL32_WHITE)
IMGUI_API void PushTexture(ImTextureRef tex_ref)
IMGUI_API void PopClipRect()
IMGUI_API void _ResetForNewFrame()
IMGUI_API void PushClipRect(const ImVec2 &clip_rect_min, const ImVec2 &clip_rect_max, bool intersect_with_current_clip_rect=false)
void PathStroke(ImU32 col, ImDrawFlags flags=0, float thickness=1.0f)
IMGUI_API void _ClearFreeMemory()
IMGUI_API void _SetDrawListSharedData(ImDrawListSharedData *data)
ImVector< ImDrawCmd > CmdBuffer
IMGUI_API void AddRectFilled(const ImVec2 &p_min, const ImVec2 &p_max, ImU32 col, float rounding=0.0f, ImDrawFlags flags=0)
IMGUI_API void PathArcToFast(const ImVec2 ¢er, float radius, int a_min_of_12, int a_max_of_12)
void PathLineTo(const ImVec2 &pos)
IMGUI_API void AddDrawCmd()
IMGUI_API void AddLine(const ImVec2 &p1, const ImVec2 &p2, ImU32 col, float thickness=1.0f)
ImVector< ImDrawVert > VtxBuffer
void ChannelsSetCurrent(int n)
IMGUI_API void AddPolyline(const ImVec2 *points, int num_points, ImU32 col, ImDrawFlags flags, float thickness)
IMGUI_API void AddText(const ImVec2 &pos, ImU32 col, const char *text_begin, const char *text_end=NULL)
void ChannelsSplit(int count)
ImDrawListSharedData * _Data
IMGUI_API void AddRect(const ImVec2 &p_min, const ImVec2 &p_max, ImU32 col, float rounding=0.0f, ImDrawFlags flags=0, float thickness=1.0f)
ImVector< ImDrawIdx > IdxBuffer
IMGUI_API void PopTexture()
ImVector< ImVec4 > _ClipRectStack
void PathFillConvex(ImU32 col)
IMGUI_API void AddTriangleFilled(const ImVec2 &p1, const ImVec2 &p2, const ImVec2 &p3, ImU32 col)
IMGUI_API void PathArcTo(const ImVec2 ¢er, float radius, float a_min, float a_max, int num_segments=0)
int RectsDiscardedSurface
ImStableVector< ImFontBaked, 32 > BakedPool
ImVector< ImFontAtlasRectEntry > RectsIndex
ImVector< ImFont * > Fonts
ImFontAtlasBuilder * Builder
IMGUI_API bool GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect *out_r) const
IMGUI_API void CompactCache()
IMGUI_API void RemoveFont(ImFont *font)
const char * FontLoaderName
unsigned int FontLoaderFlags
ImGuiContext * OwnerContext
IMGUI_API void SetFontLoader(const ImFontLoader *font_loader)
ImVector< ImTextureData * > TexList
const ImFontLoader * FontLoader
IMGUI_API bool IsGlyphLoaded(ImWchar c)
unsigned int MetricsTotalSurface
ImVector< ImFontGlyph > Glyphs
IMGUI_API float GetCharAdvance(ImWchar c)
IMGUI_API ImFontGlyph * FindGlyph(ImWchar c)
const ImFontLoader * FontLoader
unsigned int FontLoaderFlags
float FontSizeAfterScaling
float FontSizeBeforeScaling
IMGUI_API ImVec2 CalcTextSizeA(float size, float max_width, float wrap_width, const char *text_begin, const char *text_end=NULL, const char **remaining=NULL)
IMGUI_API bool IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last)
const char * GetDebugName() const
float CurrentRasterizerDensity
ImVector< ImFontConfig * > Sources
IMGUI_API void RenderChar(ImDrawList *draw_list, float size, const ImVec2 &pos, ImU32 col, ImWchar c, const ImVec4 *cpu_fine_clip=NULL)
ImFontAtlas * ContainerAtlas
IMGUI_API ImFontBaked * GetFontBaked(float font_size, float density=-1.0f)
ImGuiContextHookType Type
ImGuiContextHookCallback Callback
ImGuiConfigFlags ConfigFlagsLastFrame
ImVec4 DebugFlashStyleColorBackup
ImGuiNavItemData NavInitResult
int WantCaptureKeyboardNextFrame
int DragDropSourceFrameCount
ImGuiID NavActivateDownId
ImGuiPlatformImeData PlatformImeData
ImGuiID HoveredIdPreviousFrame
ImGuiID DebugBreakInWindow
float FramerateSecPerFrame[60]
ImGuiKeyChord ConfigNavWindowingKeyPrev
ImVector< ImGuiPopupData > OpenPopupStack
ImVector< ImGuiWindow * > Windows
ImGuiViewportP * CurrentViewport
void * ErrorCallbackUserData
ImGuiNextWindowData NextWindowData
bool DebugItemPickerActive
bool HoveredIdAllowOverlap
ImPool< ImGuiMultiSelectState > MultiSelectStorage
ImChunkStream< ImGuiWindowSettings > SettingsWindows
ImGuiTypingSelectState TypingSelectState
ImVector< ImGuiWindow * > WindowsFocusOrder
ImGuiSelectionUserData NavLastValidSelectionUserData
ImVector< ImGuiWindow * > WindowsTempSortBuffer
ImGuiDebugAllocInfo DebugAllocInfo
float MouseStationaryTimer
ImGuiID NavActivatePressedId
float WindowsBorderHoverPadding
ImGuiWindow * MovingWindow
ImGuiKeyChord ConfigNavWindowingKeyNext
ImVec2 ActiveIdClickOffset
bool WindowResizeRelativeMode
ImU8 DebugItemPickerMouseButton
ImGuiItemFlags CurrentItemFlags
ImGuiDockNode * DebugHoveredDockNode
ImGuiWindow * TooltipPreviousWindow
bool ActiveIdUsingAllKeyboardKeys
int FrameCountPlatformEnded
ImGuiTextBuffer DebugLogBuf
const char * LocalizationTable[ImGuiLocKey_COUNT]
ImVector< ImGuiID > MenusIdSubmittedThisFrame
bool NavHighlightItemUnderNav
ImGuiErrorCallback ErrorCallback
ImGuiInputSource NavInputSource
ImGuiWindow * WheelingWindow
ImGuiInputSource ActiveIdSource
ImGuiMetricsConfig DebugMetricsConfig
bool NavWindowingToggleLayer
ImGuiPayload DragDropPayload
float WheelingWindowReleaseTimer
ImGuiNextItemData NextItemData
float DisabledAlphaBackup
ImGuiDebugLogFlags DebugLogFlags
ImGuiLastItemData LastItemData
ImS8 DebugBeginReturnValueCullDepth
ImGuiID HoverItemUnlockedStationaryId
ImVector< ImTextureData * > UserTextures
int LogDepthToExpandDefault
const char * LogNextPrefix
ImGuiActivateFlags NavNextActivateFlags
float DragDropAcceptIdCurrRectSurface
ImVector< ImGuiPopupData > BeginPopupStack
float FontRasterizerDensity
ImVector< ImGuiPtrOrIndex > CurrentTabBarStack
ImGuiScrollFlags NavMoveScrollFlags
ImVector< ImFontStackData > FontStack
ImGuiID HoverItemDelayIdPreviousFrame
ImRect WindowResizeBorderExpectedRect
int WheelingWindowScrolledFrame
ImGuiContext(ImFontAtlas *shared_font_atlas)
ImGuiTextIndex DebugLogIndex
float NavWindowingHighlightAlpha
ImGuiNavItemData NavMoveResultLocal
ImGuiTextBuffer SettingsIniData
double LastKeyModsChangeTime
bool DragDropWithinSource
ImGuiID DebugDrawIdConflictsId
ImVector< ImGuiFocusScopeData > NavFocusRoute
ImGuiInputTextDeactivatedState InputTextDeactivatedState
ImGuiDragDropFlags DragDropSourceFlags
bool ConfigNavWindowingWithGamepad
ImVector< ImGuiTableTempData > TablesTempData
bool NavJustMovedToHasSelectionData
int FramerateSecPerFrameIdx
int FramerateSecPerFrameCount
ImVector< ImGuiContextHook > Hooks
ImGuiNavItemData NavMoveResultOther
ImRect PlatformMonitorsFullWorkRect
bool NavJustMovedToIsTabbing
ImGuiID CurrentFocusScopeId
ImGuiKeyChord DebugBreakKeyChord
ImU32 ActiveIdUsingNavDirMask
ImRect DragDropTargetClipRect
ImGuiPlatformMonitor FallbackMonitor
ImGuiWindow * HoveredWindow
int MultiSelectTempDataStacked
ImVec2 NavWindowingAccumDeltaPos
ImDrawListSharedData DrawListSharedData
ImVec2 WheelingWindowWheelRemainder
ImGuiDragDropFlags DragDropAcceptFlags
float DebugFlashStyleColorTime
ImVector< ImGuiGroupData > GroupStack
float NavHighlightActivatedTimer
int WantCaptureMouseNextFrame
ImGuiNavItemData NavTabbingResultFirst
ImGuiTextBuffer LogBuffer
ImGuiPlatformIO PlatformIO
ImGuiViewportP * MouseViewport
int DragDropAcceptFrameCount
ImVector< ImGuiShrinkWidthItem > ShrinkWidthBuffer
ImGuiID DragDropHoldJustPressedId
ImGuiInputSource NavWindowingInputSource
ImVector< ImGuiItemFlags > ItemFlagsStack
const char * LogNextSuffix
int ClipperTempDataStacked
ImGuiID DebugItemPickerBreakId
ImGuiKeyOwnerData KeysOwnerData[ImGuiKey_NamedKey_COUNT]
ImGuiMouseSource InputEventsNextMouseSource
int ViewportFocusedStampCount
char TempKeychordName[64]
void(* DockNodeWindowMenuHandler)(ImGuiContext *ctx, ImGuiDockNode *node, ImGuiTabBar *tab_bar)
ImGuiID NavJustMovedFromFocusScopeId
ImVector< ImFontAtlas * > FontAtlases
ImPool< ImGuiTabBar > TabBars
ImGuiErrorRecoveryState * StackSizesInBeginForCurrentWindow
ImGuiWindow * NavWindowingTarget
bool NavInitRequestFromMove
ImGuiIDStackTool DebugIDStackTool
ImGuiDir NavMoveDirForDebug
ImGuiID HoverWindowUnlockedStationaryId
ImGuiWindow * ActiveIdWindow
double LastKeyboardKeyPressTime
ImVector< ImGuiWindowStackData > CurrentWindowStack
ImRect DragDropTargetRect
ImGuiID DebugBreakInTable
ImGuiKeyRoutingTable KeysRoutingTable
int ErrorCountCurrentFrame
ImGuiWindow * HoveredWindowBeforeClear
ImGuiErrorRecoveryState StackSizesInNewFrame
int DebugDrawIdConflictsCount
bool ActiveIdHasBeenPressedBefore
int DebugLogSkippedErrors
bool ActiveIdIsJustActivated
ImVector< ImGuiViewportP * > Viewports
ImGuiWindow * CurrentWindow
ImVector< ImGuiListClipperData > ClipperTempData
ImVector< float > TablesLastTimeActive
ImGuiWindow * NavWindowingListWindow
float HoverItemDelayClearTimer
ImGuiWindow * NavWindowingTargetAnim
ImU8 DebugLogAutoDisableFrames
bool WithinFrameScopeWithImplicitWindow
ImVector< char > ClipboardHandlerData
ImBitArrayForNamedKeys KeysMayBeCharInput
ImVector< char > TempBuffer
ImGuiDeactivatedItemData DeactivatedItemData
bool ActiveIdAllowOverlap
ImGuiCol DebugFlashStyleColorIdx
ImGuiMouseCursor MouseCursor
bool ActiveIdFromShortcut
ImGuiInputTextState InputTextState
ImGuiID PlatformLastFocusedViewportId
ImGuiID DragDropAcceptIdPrev
int PlatformWindowsCreatedCount
ImVec2 NavWindowingAccumDeltaSize
bool DragDropWithinTarget
ImVector< ImGuiStyleMod > StyleVarStack
ImGuiID NavNextActivateId
float FramerateSecPerFrameAccum
ImVector< ImDrawChannel > DrawChannelsTempMergeBuffer
int WantTextInputNextFrame
bool DebugBreakInLocateId
ImGuiKey NavWindowingToggleKey
unsigned char DragDropPayloadBufLocal[16]
float HoveredIdNotActiveTimer
ImGuiDebugLogFlags DebugLogAutoDisableFlags
ImGuiWindow * HoveredWindowUnderMovingWindow
bool ActiveIdHasBeenEditedBefore
int HoveredIdPreviousFrameItemCount
bool NavMoveForwardToNextFrame
ImGuiViewportP * MouseLastHoveredViewport
ImGuiPlatformImeData PlatformImeDataPrev
ImGuiBoxSelectState BoxSelectState
ImChunkStream< ImGuiTableSettings > SettingsTables
int WheelingWindowStartFrame
ImU32 InputEventsNextEventId
ImGuiKeyChord NavMoveKeyMods
ImGuiConfigFlags ConfigFlagsCurrFrame
ImGuiTable * CurrentTable
ImGuiKeyChord NavJustMovedToKeyMods
ImGuiMultiSelectTempData * CurrentMultiSelect
ImGuiDockContext DockContext
ImVector< ImGuiSettingsHandler > SettingsHandlers
ImRect NavScoringNoClipRect
ImGuiTabBar * CurrentTabBar
ImGuiActivateFlags NavActivateFlags
ImVector< ImGuiColorMod > ColorStack
ImVector< ImGuiTreeNodeStackData > TreeNodeStack
ImGuiNavItemData NavMoveResultLocalVisible
ImGuiNavMoveFlags NavMoveFlags
ImVector< ImGuiFocusScopeData > FocusScopeStack
ImVector< ImGuiInputEvent > InputEventsQueue
double LastKeyModsChangeFromNoneTime
short TooltipOverrideCount
bool ActiveIdHasBeenEditedThisFrame
ImVec2 ErrorTooltipLockedPos
float HoverItemDelayTimer
ImVec2 WheelingWindowRefMousePos
ImVector< ImGuiInputEvent > InputEventsTrail
bool ActiveIdNoClearOnFocusLoss
ImGuiID NavJustMovedToFocusScopeId
ImGuiID DragDropAcceptIdCurr
ImGuiKeyChord DebugBreakInShortcutRouting
ImGuiID NavHighlightActivatedId
ImVector< unsigned char > DragDropPayloadBufHeap
ImGuiID ActiveIdPreviousFrame
ImPool< ImGuiTable > Tables
ImVector< ImGuiMultiSelectTempData > MultiSelectTempData
ImGuiDebugAllocEntry LastEntriesBuf[6]
ImGuiDockContextPruneNodeData()
ImVector< ImGuiDockRequest > Requests
ImVector< ImGuiDockNodeSettings > NodesSettings
ImGuiDockNode * CentralNode
ImGuiDockNode * FirstNodeWithWindows
int CountNodesWithWindows
ImGuiDataAuthority AuthorityForViewport
ImGuiDockNode * CentralNode
ImGuiID LastFocusedNodeId
bool WantHiddenTabBarToggle
ImGuiDockNode * ParentNode
ImGuiDockNode * ChildNodes[2]
bool IsFloatingNode() const
bool IsCentralNode() const
ImVector< ImGuiWindow * > Windows
ImGuiWindowClass WindowClass
ImGuiDockNodeFlags MergedFlags
ImGuiDockNodeFlags LocalFlagsInWindows
bool IsHiddenTabBar() const
ImGuiWindow * VisibleWindow
ImGuiDataAuthority AuthorityForSize
ImGuiDockNodeFlags SharedFlags
ImGuiDockNodeFlags LocalFlags
bool WantHiddenTabBarUpdate
ImGuiDataAuthority AuthorityForPos
ImGuiDockNode(ImGuiID id)
ImGuiDockNode * OnlyNodeWithWindows
void SetLocalFlags(ImGuiDockNodeFlags flags)
ImGuiDockNode * SplitNode
ImRect DropRectsDraw[ImGuiDir_COUNT+1]
ImGuiDockNode * UndockTargetNode
ImGuiWindow * DockPayload
ImGuiDockNode * DockTargetNode
ImGuiWindow * UndockTargetWindow
ImGuiDockRequestType Type
ImGuiWindow * DockTargetWindow
short SizeOfBeginPopupStack
short SizeOfDisabledStack
short SizeOfFocusScopeStack
short SizeOfStyleVarStack
short SizeOfItemFlagsStack
float BackupCurrLineTextBaseOffset
bool BackupHoveredIdIsAlive
ImVec2 BackupCursorPosPrevLine
ImGuiID BackupActiveIdIsAlive
ImVec2 BackupCursorMaxPos
ImVec2 BackupCurrLineSize
bool BackupDeactivatedIdIsAlive
IMGUI_API void AddFocusEvent(bool focused)
bool WantCaptureMouseUnlessPopupClose
bool ConfigErrorRecoveryEnableDebugLog
IMGUI_API void AddInputCharacterUTF16(ImWchar16 c)
bool ConfigDebugBeginReturnValueOnce
bool ConfigWindowsCopyContentsWithCtrlC
IMGUI_API void AddInputCharacter(unsigned int c)
float MouseDoubleClickMaxDist
bool ConfigDockingAlwaysTabBar
bool ConfigWindowsMoveFromTitleBarOnly
void(* SetClipboardTextFn)(void *user_data, const char *text)
ImVec2 MouseClickedPos[5]
bool ConfigErrorRecoveryEnableTooltip
bool ConfigDebugHighlightIdConflictsShowItemPicker
bool ConfigNavMoveSetMousePos
bool ConfigScrollbarScrollByPage
IMGUI_API void AddMouseWheelEvent(float wheel_x, float wheel_y)
ImVec2 MouseDragMaxDistanceAbs[5]
ImWchar16 InputQueueSurrogate
ImVector< ImWchar > InputQueueCharacters
IMGUI_API void AddKeyEvent(ImGuiKey key, bool down)
const char * BackendPlatformName
float MouseDownDurationPrev[5]
IMGUI_API void ClearInputKeys()
bool MouseDownOwnedUnlessPopupClose[5]
bool ConfigNavSwapGamepadButtons
ImGuiConfigFlags ConfigFlags
IMGUI_API void AddMouseViewportEvent(ImGuiID id)
bool ConfigDebugIgnoreFocusLoss
bool ConfigDebugBeginReturnValueLoop
IMGUI_API void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index=-1)
void * BackendPlatformUserData
bool ConfigNavEscapeClearFocusWindow
bool ConfigNavCaptureKeyboard
ImVec2 DisplayFramebufferScale
bool ConfigDebugIsDebuggerPresent
bool ConfigViewportsNoDecoration
bool ConfigDockingTransparentPayload
bool ConfigNavEscapeClearFocusItem
IMGUI_API void ClearInputCharacters()
float MouseDragMaxDistanceSqr[5]
bool ConfigNavCursorVisibleAuto
bool MouseDoubleClicked[5]
IMGUI_API void SetAppAcceptingEvents(bool accepting_events)
int MetricsRenderVertices
bool ConfigDragClickToInputText
ImGuiBackendFlags BackendFlags
const char *(* GetClipboardTextFn)(void *user_data)
bool MouseCtrlLeftAsRightClick
bool ConfigNavCursorVisibleAlways
void * BackendRendererUserData
IMGUI_API void ClearInputMouse()
IMGUI_API void AddMouseButtonEvent(int button, bool down)
bool ConfigErrorRecoveryEnableAssert
bool ConfigWindowsResizeFromEdges
bool ConfigMacOSXBehaviors
bool ConfigDebugIniSettings
float MouseDownDuration[5]
IMGUI_API void AddMousePosEvent(float x, float y)
bool ConfigViewportsNoAutoMerge
bool ConfigInputTextEnterKeepActive
IMGUI_API void AddInputCharactersUTF8(const char *str)
ImU16 MouseClickedCount[5]
bool ConfigDockingWithShift
IMGUI_API void AddKeyAnalogEvent(ImGuiKey key, bool down, float v)
bool MouseWheelRequestAxisSwap
bool ConfigDockingNoSplit
const char * BackendRendererName
bool ConfigInputTextCursorBlink
void * BackendLanguageUserData
IMGUI_API void AddMouseSourceEvent(ImGuiMouseSource source)
ImGuiMouseSource MouseSource
bool ConfigViewportsNoDefaultParent
bool ConfigDebugHighlightIdConflicts
ImGuiID MouseHoveredViewport
double MouseReleasedTime[5]
float ConfigMemoryCompactTimer
float MouseDoubleClickTime
ImU16 MouseClickedLastCount[5]
IMGUI_API void ClearEventsQueue()
bool ConfigInputTrickleEventQueue
bool ConfigDpiScaleViewports
bool FontAllowUserScaling
bool ConfigViewportsNoTaskBarIcon
double MouseClickedTime[5]
ImGuiKeyData KeysData[ImGuiKey_NamedKey_COUNT]
ImGuiKeyRoutingIndex NextEntryIndex
ImVector< ImGuiKeyRoutingData > Entries
ImVector< ImGuiKeyRoutingData > EntriesNext
ImGuiKeyRoutingIndex Index[ImGuiKey_NamedKey_COUNT]
ImGuiItemStatusFlags StatusFlags
void Reset(ImGuiListClipper *clipper)
ImVector< ImGuiListClipperRange > Ranges
static ImGuiListClipperRange FromPositions(float y1, float y2, int off_min, int off_max)
static ImGuiListClipperRange FromIndices(int min, int max)
IMGUI_API void Begin(int items_count, float items_height=-1.0f)
IMGUI_API void IncludeItemsByIndex(int item_begin, int item_end)
IMGUI_API void SeekCursorForItem(int item_index)
IMGUI_API ~ImGuiListClipper()
IMGUI_API ImGuiListClipper()
void Update(float spacing, bool window_reappearing)
bool ShowDrawCmdBoundingBoxes
bool ShowTextEncodingViewer
bool ShowWindowsBeginOrder
ImGuiID HighlightViewportID
ImGuiMultiSelectState * Storage
ImGuiSelectionUserData SelectionUserData
ImGuiInputFlags ShortcutFlags
ImGuiNextItemDataFlags HasFlags
ImGuiSelectionUserData SelectionUserData
ImGuiNextWindowDataFlags HasFlags
void * SizeCallbackUserData
ImGuiWindowRefreshFlags RefreshFlagsVal
ImRect SizeConstraintRect
ImGuiChildFlags ChildFlags
ImGuiWindowClass WindowClass
ImVec2 MenuBarOffsetMinVal
ImGuiSizeCallback SizeCallback
ImGuiOldColumnFlags Flags
ImVector< ImGuiOldColumnData > Columns
bool IsDataType(const char *type) const
void(* ReadLineFn)(ImGuiContext *ctx, ImGuiSettingsHandler *handler, void *entry, const char *line)
void(* ReadInitFn)(ImGuiContext *ctx, ImGuiSettingsHandler *handler)
void(* ClearAllFn)(ImGuiContext *ctx, ImGuiSettingsHandler *handler)
void *(* ReadOpenFn)(ImGuiContext *ctx, ImGuiSettingsHandler *handler, const char *name)
void(* ApplyAllFn)(ImGuiContext *ctx, ImGuiSettingsHandler *handler)
void(* WriteAllFn)(ImGuiContext *ctx, ImGuiSettingsHandler *handler, ImGuiTextBuffer *out_buf)
IMGUI_API float GetFloat(ImGuiID key, float default_val=0.0f) const
IMGUI_API bool GetBool(ImGuiID key, bool default_val=false) const
IMGUI_API int * GetIntRef(ImGuiID key, int default_val=0)
IMGUI_API void ** GetVoidPtrRef(ImGuiID key, void *default_val=NULL)
IMGUI_API float * GetFloatRef(ImGuiID key, float default_val=0.0f)
IMGUI_API void SetVoidPtr(ImGuiID key, void *val)
IMGUI_API void BuildSortByKey()
ImVector< ImGuiStoragePair > Data
IMGUI_API void * GetVoidPtr(ImGuiID key) const
IMGUI_API void SetFloat(ImGuiID key, float val)
IMGUI_API void SetBool(ImGuiID key, bool val)
IMGUI_API int GetInt(ImGuiID key, int default_val=0) const
IMGUI_API void SetAllInt(int val)
IMGUI_API bool * GetBoolRef(ImGuiID key, bool default_val=false)
IMGUI_API void SetInt(ImGuiID key, int val)
void * GetVarPtr(void *parent) const
float WindowBorderHoverPadding
ImVec4 Colors[ImGuiCol_COUNT]
ImGuiHoveredFlags HoverFlagsForTooltipNav
float DockingSeparatorSize
float _NextFrameFontSizeBase
float CurveTessellationTol
ImGuiDir ColorButtonPosition
IMGUI_API void ScaleAllSizes(float scale_factor)
float SeparatorTextBorderSize
float TabCloseButtonMinWidthSelected
ImVec2 DisplaySafeAreaPadding
ImGuiHoveredFlags HoverFlagsForTooltipMouse
ImGuiTreeNodeFlags TreeLinesFlags
ImVec2 DisplayWindowPadding
ImVec2 SeparatorTextAlign
ImGuiDir WindowMenuButtonPosition
ImVec2 TableAngledHeadersTextAlign
float CircleTessellationMaxError
float HoverStationaryDelay
bool AntiAliasedLinesUseTex
float TabCloseButtonMinWidthUnselected
ImVec2 SeparatorTextPadding
float TableAngledHeadersAngle
ImVec2 SelectableTextAlign
ImVector< ImGuiTabItem > Tabs
ImGuiID NextSelectedTabId
float ContentMaxXHeadersIdeal
float ContentMaxXHeadersUsed
float ContentMaxXUnfrozen
float LastTopHeadersRowHeight
ImGuiTableColumnIdx HoveredColumnBody
ImSpan< ImGuiTableColumn > Columns
ImGuiWindow * OuterWindow
ImGuiWindow * InnerWindow
IMGUI_API void appendf(const char *fmt,...) IM_FMTARGS(2)
static IMGUI_API char EmptyString[1]
IMGUI_API void append(const char *str, const char *str_end=NULL)
const char * c_str() const
IMGUI_API void appendfv(const char *fmt, va_list args) IM_FMTLIST(2)
const char * begin() const
ImVector< ImGuiTextRange > Filters
IMGUI_API bool PassFilter(const char *text, const char *text_end=NULL) const
IMGUI_API ImGuiTextFilter(const char *default_filter="")
IMGUI_API bool Draw(const char *label="Filter (inc,-exc)", float width=0.0f)
const char * get_line_end(const char *base, int n)
void append(const char *base, int old_size, int new_size)
const char * get_line_begin(const char *base, int n)
ImDrawList * BgFgDrawLists[2]
ImDrawDataBuilder DrawDataBuilder
int BgFgDrawListsLastFrame[2]
ImRect GetMainRect() const
ImRect GetWorkRect() const
int LastFocusedStampCount
bool LastFocusedHadNavWindow
bool PlatformWindowCreated
bool PlatformRequestClose
bool PlatformRequestResize
ImGuiDockNodeFlags DockNodeFlagsOverrideSet
ImGuiViewportFlags ViewportFlagsOverrideSet
ImGuiViewportFlags ViewportFlagsOverrideClear
ImGuiID FocusRouteParentWindowId
bool DockingAllowUnclassed
ImGuiTabItemFlags TabItemFlagsOverrideSet
ImU32 Colors[ImGuiWindowDockStyleCol_COUNT]
ImGuiLastItemData ParentLastItemDataBackup
float DisabledOverrideReenableAlphaBackup
bool DisabledOverrideReenable
ImGuiErrorRecoveryState StackSizesInBegin
bool NavHideHighlightOneFrame
ImGuiItemStatusFlags DockTabItemStatusFlags
float CurrLineTextBaseOffset
ImVec2 CursorStartPosLossyness
short NavLayersActiveMask
ImGuiLayoutType LayoutType
float PrevLineTextBaseOffset
short NavLayersActiveMaskNext
ImU32 TreeHasStackDataDepthMask
ImU32 TreeRecordsClippedNodesY2Mask
ImGuiMenuColumns MenuColumns
ImGuiItemStatusFlags WindowItemStatusFlags
ImGuiNavLayer NavLayerCurrent
ImVector< float > TextWrapPosStack
ImVector< float > ItemWidthStack
ImVector< ImGuiWindow * > ChildWindows
ImGuiItemStatusFlags ChildItemStatusFlags
ImGuiOldColumns * CurrentColumns
bool NavIsScrollPushableX
ImGuiStorage * StateStorage
ImGuiLayoutType ParentLayoutType
ImGuiWindowClass WindowClass
ImRect TitleBarRect() const
ImGuiCond SetWindowSizeAllowFlags
int ViewportAllowPlatformMonitorExtend
int MemoryDrawListVtxCapacity
short BeginCountPreviousFrame
ImVector< ImGuiID > IDStack
ImGuiID NavLastIds[ImGuiNavLayer_COUNT]
ImGuiStorage StateStorage
signed char ResizeBorderHeld
ImGuiChildFlags ChildFlags
ImGuiDockNode * DockNodeAsHost
ImVec2 ScrollTargetCenterRatio
ImGuiID GetIDFromRectangle(const ImRect &r_abs)
ImGuiID GetIDFromPos(const ImVec2 &p_abs)
ImU8 ScrollbarXStabilizeToggledHistory
ImGuiCond SetWindowCollapsedAllowFlags
ImRect MenuBarRect() const
ImGuiWindow * RootWindowPopupTree
ImGuiID NavRootFocusScopeId
ImGuiWindow * ParentWindow
ImS8 HiddenFramesForRenderOnly
ImVec2ih HitTestHoleOffset
ImGuiWindow * NavLastChildNavWindow
ImS8 HiddenFramesCannotSkipItems
signed char ResizeBorderHovered
ImGuiWindow * ParentWindowForFocusRoute
ImGuiWindowFlags FlagsPreviousFrame
ImGuiCond SetWindowPosAllowFlags
ImGuiWindow * RootWindowForNav
int MemoryDrawListIdxCapacity
ImGuiWindow * ParentWindowInBeginStack
ImVec2 ScrollTargetEdgeSnapDist
short BeginOrderWithinParent
ImGuiDir AutoPosLastDirection
ImVec2 ContentSizeExplicit
ImRect NavRectRel[ImGuiNavLayer_COUNT]
ImGuiViewportP * Viewport
ImVec2 NavPreferredScoringPosRel[ImGuiNavLayer_COUNT]
float FontWindowScaleParents
ImGuiWindow(ImGuiContext *context, const char *name)
ImGuiWindowDockStyle DockStyle
ImVector< ImGuiOldColumns > ColumnsStorage
bool ScrollbarXStabilizeEnabled
ImGuiWindow * RootWindowDockTree
ImGuiWindow * RootWindowForTitleBarHighlight
ImGuiCond SetWindowDockAllowFlags
ImS8 HiddenFramesCanSkipItems
short BeginOrderWithinContext
ImGuiID GetID(const char *str, const char *str_end=NULL)
T * GetByIndex(ImPoolIdx n)
int GetAliveCount() const
T * TryGetMapData(ImPoolIdx n)
T * GetOrAddByKey(ImGuiID key)
void Reserve(int capacity)
T * GetByKey(ImGuiID key)
bool Overlaps(const ImRect &r) const
void TranslateX(float dx)
void ClipWithFull(const ImRect &r)
void Add(const ImVec2 &p)
void Translate(const ImVec2 &d)
bool ContainsWithPad(const ImVec2 &p, const ImVec2 &pad) const
void TranslateY(float dy)
void ClipWith(const ImRect &r)
bool Contains(const ImVec2 &p) const
void Expand(const float amount)
bool WantDestroyNextFrame
ImTextureID GetTexID() const
void reserve(int new_capacity)
void push_front(const T &v)
bool contains(const T &v) const
int index_from_ptr(const T *it) const
bool find_erase(const T &v)
T * insert(const T *it, const T &v)
void push_back(const T &v)
void resize(int new_size)
int size_in_bytes() const
void swap(ImVector< T > &rhs)
int open(const char *, int)
Opens a file descriptor.